OSDN Git Service

Pacify some coverity nits.
authorPeter Jones <pjones@redhat.com>
Tue, 12 Jun 2018 18:36:20 +0000 (14:36 -0400)
committerPeter Jones <pjones@redhat.com>
Tue, 12 Jun 2018 18:36:20 +0000 (14:36 -0400)
commitbd609a59369574c95f7f31b15caae8bb86b71f39
tree58931d253e862884896e24031e5261dd679ced63
parentdaf3b6c6ae8a766f362c87dc80e40005428a1b2a
Pacify some coverity nits.

Coverity has trouble tracking data flow sometimes, and believes that
sysfs_readlink() and read_sysfs_file() will sometimes return >= 0 when
the buffer has not been filled out.  This changes the check to also test
for a NULL pointer, hopefully pacifying it.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/linux-pci.c
src/linux.c