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:
John Ferlan 2015-09-01 06:56:38 -04:00
parent 11822fff28
commit 53caf99db6

View File

@ -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;
}
}