]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virnetdev: Check correct return value for virNetDevFeatureAvailable
authorJohn Ferlan <jferlan@redhat.com>
Tue, 3 Nov 2015 22:01:25 +0000 (17:01 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 4 Nov 2015 19:28:06 +0000 (14:28 -0500)
commit4ee1b16a54f61be5cadd8de9ede062cb535ebf28
treee1f06761872c0e3f0e412f9cfa5ac7e917f9240a
parent703ec1b73da3560374cba65017d9eaf58f92c695
virnetdev: Check correct return value for virNetDevFeatureAvailable

Rather than "if (virNetDevFeatureAvailable(ifname, &cmd))" change the
success criteria to "if (virNetDevFeatureAvailable(ifname, &cmd) == 1)".

The called helper returns -1 on failure, 0 on not found, and 1 on found.
Thus a failure was setting bits.

Introduced by commit ac3ed20 which changed the helper's return
values without adjusting its callers

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/util/virnetdev.c