mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user