about summary refs log tree commit diff
path: root/src/dirent/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dirent/readdir.c')
-rw-r--r--src/dirent/readdir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dirent/readdir.c b/src/dirent/readdir.c
index 1aeb25a5..2d27d29a 100644
--- a/src/dirent/readdir.c
+++ b/src/dirent/readdir.c
@@ -16,10 +16,7 @@ struct dirent *readdir(DIR *dir)
 	
 	if (dir->buf_pos >= dir->buf_end) {
 		int len = __getdents(dir->fd, (void *)dir->buf, sizeof dir->buf);
-		if (len < 0) {
-			dir->lock = 0;
-			return NULL;
-		} else if (len == 0) return 0;
+		if (len <= 0) return 0;
 		dir->buf_end = len;
 		dir->buf_pos = 0;
 	}