Re: [libvirt] [PATCH] nwfilter: fix tear down order and consolidate functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 15, 2010 at 08:27:07AM -0600, Eric Blake wrote:
> On 04/14/2010 03:10 PM, Stefan Berger wrote:
> > To avoid race-conditions, the tear down of a filter has to happen before
> > the tap interface disappears and another tap interface with the same
> > name can re-appear. This patch tries to fix this. In one place, where
> > communication with the qemu monitor may fail, I am only tearing the
> > filters down after knowing that the function did not fail.
> > 
> > I am also moving the tear down functions into an include file for other
> > drivers to reuse.
> 
> ACK.

  ACK too,

> > +static inline void
> > +virNWFilterTearVMNWFilters(virDomainObjPtr vm) {
> > +    int i;
> > +    for (i = 0; i < vm->def->nnets; i++)
> 
> Is it worth using C99 syntax, to condense two lines to one?
> 
> for (int i = 0; ...
> 
> But that's a general question, and should not hold up your patch.

  so far we never did it in the code, so for consistency I would avoid
that, I also like to have an empty line after variable(s) declarations.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]