提交 53caf99d 编写于 作者: J John Ferlan

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.
上级 11822fff
...@@ -797,8 +797,7 @@ virFileNBDDeviceFindUnused(void) ...@@ -797,8 +797,7 @@ virFileNBDDeviceFindUnused(void)
if (rv < 0) if (rv < 0)
goto cleanup; goto cleanup;
if (rv == 0) { if (rv == 0) {
if (virAsprintf(&ret, "/dev/%s", de->d_name) < 0) ignore_value(virAsprintf(&ret, "/dev/%s", de->d_name));
goto cleanup;
goto cleanup; goto cleanup;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册