test: pass the open mode to open(O_CREAT)

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-06-18 13:41:18 +10:00
parent 2c4f963b18
commit 7266ed600a

View file

@ -1146,7 +1146,7 @@ litest_copy_file(const char *dest, const char *src, const char *header)
rindex(file->path, '.');
out = mkstemps(file->path, suffixlen);
} else {
out = open(file->path, O_CREAT|O_WRONLY);
out = open(file->path, O_CREAT|O_WRONLY, 0644);
}
if (out == -1)
litest_abort_msg("Failed to write to file %s (%s)\n",