Explorar o código

tests: fdopen: add missing mode args to open()

We call open() with O_CREAT, so make sure we pass in the mode else
we might get build errors with fortify source.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger %!s(int64=13) %!d(string=hai) anos
pai
achega
7064156385
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      test/misc/fdopen.c

+ 1 - 1
test/misc/fdopen.c

@@ -33,7 +33,7 @@ main (int argc, char *argv[])
   assert (fclose (fp) == 0);
   fp = NULL;
 
-  fd = open (name, O_RDWR|O_CREAT);
+  fd = open (name, O_RDWR|O_CREAT, 0660);
   assert (fd != -1);
   assert (lseek (fd, 5, SEEK_SET) == 5);