mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
udevProcessCCW: Initialize variable
`udevGetIntSysfsAttr` does not necessarily write to the third parameter, even when it returns 0. This was found by clang-tidy's "clang-analyzer-core.UndefinedBinaryOperatorResult" check. Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
1e2e8ac88f
commit
795187fe0c
@ -1100,7 +1100,7 @@ static int
|
||||
udevProcessCCW(struct udev_device *device,
|
||||
virNodeDeviceDefPtr def)
|
||||
{
|
||||
int online;
|
||||
int online = 0;
|
||||
|
||||
/* process only online devices to keep the list sane */
|
||||
if (udevGetIntSysfsAttr(device, "online", &online, 0) < 0 || online != 1)
|
||||
|
Loading…
Reference in New Issue
Block a user