From 7266ed600a8b7966babe56cf4022a4b2930aefeb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Jun 2018 13:41:18 +1000 Subject: [PATCH] test: pass the open mode to open(O_CREAT) Found by coverity Signed-off-by: Peter Hutterer --- test/litest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index 3a63ff54..caf2c8c8 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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",