mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
virfile: Avoid Coverity IDENTICAL_BRANCHES error
In virFileNBDDeviceFindUnused if virFileNBDDeviceIsBusy returns 0, then both branches jumped to cleanup, so just use ignore_value since the function returns NULL or some memory and the caller handles the error.
This commit is contained in:
parent
11822fff28
commit
53caf99db6
@ -797,8 +797,7 @@ virFileNBDDeviceFindUnused(void)
|
||||
if (rv < 0)
|
||||
goto cleanup;
|
||||
if (rv == 0) {
|
||||
if (virAsprintf(&ret, "/dev/%s", de->d_name) < 0)
|
||||
goto cleanup;
|
||||
ignore_value(virAsprintf(&ret, "/dev/%s", de->d_name));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user