[libvirt] [PATCH 1/3] virnetdev: Check correct return value for virNetDevFeatureAvailable

Ján Tomko jtomko at redhat.com
Wed Nov 4 09:30:27 UTC 2015


On Tue, Nov 03, 2015 at 07:18:09PM -0500, John Ferlan wrote:
> 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.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/util/virnetdev.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

ACK, introduced by commit ac3ed20 which changed the helper's return
values without adjusting its callers.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151104/93d04662/attachment-0001.sig>


More information about the libvir-list mailing list