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: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
John Ferlan 2019-11-12 16:10:12 -05:00
parent 6c37ee4da2
commit d70024d0a6

View File

@ -543,8 +543,7 @@ virFileRewrite(const char *path,
cleanup:
VIR_FORCE_CLOSE(fd);
if (newfile)
unlink(newfile);
unlink(newfile);
return ret;
}