]> git.ipfire.org Git - thirdparty/libvirt.git/commit
netdev: Use virNetDevIsVirtualFunction() properly
authorAndrea Bolognani <abologna@redhat.com>
Thu, 25 Feb 2016 11:03:35 +0000 (12:03 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 25 Feb 2016 16:09:52 +0000 (17:09 +0100)
commitdec3a4a135cf2819379317ea5a4900770c80a76e
tree3f286f3f374d4d600bbdd69035c42655e656e349
parent04e10925a141771eaff2733f36f344074bb7342d
netdev: Use virNetDevIsVirtualFunction() properly

virNetDevIsVirtualFunction() returns 1 if the interface is a
virtual function, 0 if it isn't and -1 on error. This means that,
despite the name suggesting otherwise, using it as a predicate is
not correct.

Fix two callers that were doing so adding an explicit check on
the return value.
src/util/virnetdev.c