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

Re: [libvirt] [PATCH] nwfilter: cleanup return codes in nwfilter subsystem

On 11/23/2011 03:49 PM, Eric Blake wrote:
> On 11/23/2011 02:19 PM, Stefan Berger wrote:
>> This patch cleans up return codes in the nwfilter subsystem.
>> Some functions in nwfilter_conf.c (validators and formatters) are
>> keeping their bool return for now and I am converting their return
>> code to true/false.
>> All other functions now return -1 on failure and 0 on success.

> I compile tested this, and assume you also ran it through libvirt-TCK.
> My compile run complained:
> qemu/qemu_command.c: In function 'qemuNetworkIfaceConnect':
> qemu/qemu_command.c:278:65: error: suggest braces around empty body in
> an 'if' statement [-Werror=empty-body]
> [more on this below]

The quickie fix:

diff --git i/src/qemu/qemu_command.c w/src/qemu/qemu_command.c
index 4310a62..0220ac3 100644
--- i/src/qemu/qemu_command.c
+++ w/src/qemu/qemu_command.c
@@ -275,7 +275,7 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,

     if (tapfd >= 0) {
         if ((net->filter) && (net->ifname)) {
-            if (virDomainConfNWFilterInstantiate(conn, net) < 0);
+            if (virDomainConfNWFilterInstantiate(conn, net) < 0)

>> Index: libvirt-acl/src/nwfilter/nwfilter_driver.c
> This is as far as I got today.

Alas, I don't have time to resume this today; it will probably be Monday
before I can audit the rest of the patch for sanity.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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