[libvirt] [PATCH] nwfilter: fix tear down order and consolidate functions
Daniel Veillard
veillard at redhat.com
Thu Apr 15 15:09:01 UTC 2010
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 at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list