Browse Source

Use O_DIRECTORY in unistd/fchdir

Jeremy Soller 5 years ago
parent
commit
27d97f6fe0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/unistd/fchdir.c

+ 1 - 1
tests/unistd/fchdir.c

@@ -6,7 +6,7 @@
 #include "test_helpers.h"
 
 int main(void) {
-    int fd = open("..", 0, 0);
+    int fd = open("..", O_DIRECTORY);
     ERROR_IF(open, fd, == -1);
     UNEXP_IF(open, fd, < 0);