浏览代码

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 年之前
父节点
当前提交
7064156385
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);