浏览代码

Removed pointless initialization to 0 of DIR fields
after having added memset.
Thanks to Peter Mazinger for pointing this out.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>

Carmelo Amoroso 18 年之前
父节点
当前提交
06f8c11fef
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      libc/misc/dirent/opendir.c

+ 0 - 1
libc/misc/dirent/opendir.c

@@ -66,7 +66,6 @@ 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)