summaryrefslogtreecommitdiff
path: root/libc/misc/dirent
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-09 12:04:00 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-09 12:04:00 +0000
commit96c028b213f14921bad01b05c0df5fceb5e5a743 (patch)
tree707f76c2a391e97112e9a0264666f890e82662a7 /libc/misc/dirent
parent33bcf733559a1108049c1d33ea8fafce0150e5f8 (diff)
Revert latest changes. Instead of applying this work-around
a proper fix should ensure that statically linked mutli-threaded binaries take always the proper locking implementation. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/dirent')
-rw-r--r--libc/misc/dirent/opendir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c
index cfc699be0..26ab91511 100644
--- a/libc/misc/dirent/opendir.c
+++ b/libc/misc/dirent/opendir.c
@@ -64,9 +64,8 @@ close_and_ret:
if (!(ptr = malloc(sizeof(*ptr))))
goto nomem_close_and_ret;
- memset(ptr, '\0', sizeof(DIR));
ptr->dd_fd = fd;
-
+ ptr->dd_nextloc = ptr->dd_size = ptr->dd_nextoff = 0;
ptr->dd_max = statbuf.st_blksize;
if (ptr->dd_max < 512)
ptr->dd_max = 512;