Browse Source

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 12 years ago
parent
commit
7064156385
1 changed files with 1 additions and 1 deletions
  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);