]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hostdev: Remove temporary variable when checking for VF
authorAndrea Bolognani <abologna@redhat.com>
Wed, 24 Feb 2016 17:06:52 +0000 (18:06 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 25 Feb 2016 16:09:53 +0000 (17:09 +0100)
commitb2ce5b027c7e79347d73302c58dcc0bfd1f2f772
treefe424c1c05bb7c0573c813c4a518ae1888991697
parentdec3a4a135cf2819379317ea5a4900770c80a76e
hostdev: Remove temporary variable when checking for VF

The virHostdevIsVirtualFunction() was called exactly twice, and in
both cases the return value was saved to a temporary variable before
being checked. This would be okay if it improved readability, but in
this case is pretty pointless.

Get rid of the temporary variable and check the return value
directly; while at it, change the check from '<= 0' to '!= 1' to
align it with the way other similar *IsVirtualFunction() functions
are used thorough the code.
src/util/virhostdev.c