summary refs log tree commit diff
path: root/sysdeps/unix/readdir_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/readdir_r.c')
-rw-r--r--sysdeps/unix/readdir_r.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sysdeps/unix/readdir_r.c b/sysdeps/unix/readdir_r.c
index a4462f73e7..6d70233e6e 100644
--- a/sysdeps/unix/readdir_r.c
+++ b/sysdeps/unix/readdir_r.c
@@ -96,10 +96,7 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
     } while (dp->d_ino == 0);
 
   if (dp != NULL)
-    {
-      memcpy (entry, dp, reclen);
-      *result = entry;
-    }
+    *result = memcpy (entry, dp, reclen);
 
   __libc_lock_unlock (dirp->lock);