]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pci: Fix virPCIGetPhysicalFunction()'s callers
authorAndrea Bolognani <abologna@redhat.com>
Wed, 25 May 2016 08:01:58 +0000 (10:01 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 25 May 2016 08:38:01 +0000 (10:38 +0200)
commitfc9ba9d574e5ac243b5755cc0c314b798e993dcf
tree4c1db866eeaa48e336863795624f689ba85720ac
parent063da39376299fbbc893ddf56cff276c0aeb31b6
pci: Fix virPCIGetPhysicalFunction()'s callers

Commit c8b1a83605e4 changed the function, making it
impossible for callers to be able to tell whether a
non-negative return value means "physical function
address found and parsed correctly" or "couldn't find
corresponding physical function".

The important difference between the two being that,
in the latter case, the returned pointer is NULL and
should never, ever be dereferenced.

In order to cope with these changes, the callers
have to be updated.
src/node_device/node_device_linux_sysfs.c
src/util/virpci.c