about summary refs log tree commit diff
path: root/sysdeps/unix/opendir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/opendir.c')
-rw-r--r--sysdeps/unix/opendir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 34f5b719d3..0a116247d2 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -194,11 +194,11 @@ __alloc_dir (int fd, bool close_fd, const struct stat64 *statp)
       return NULL;
     }
 
-  dirp->allocation = allocation;
+  dirp->fd = fd;
 #ifndef NOT_IN_libc
   __libc_lock_init (dirp->lock);
 #endif
-  dirp->fd = fd;
+  dirp->allocation = allocation;
   dirp->size = 0;
   dirp->offset = 0;
   dirp->filepos = 0;