提交 d70024d0 编写于 作者: J John Ferlan

util: Remove unnecessary check in virFileRewrite

Since g_strdup_printf will abort, we know @newfile won't be NULL.

Found by Coverity
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 6c37ee4d
......@@ -543,8 +543,7 @@ virFileRewrite(const char *path,
cleanup:
VIR_FORCE_CLOSE(fd);
if (newfile)
unlink(newfile);
unlink(newfile);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册