From 3da29223584b1a336be6ba6c257f748196146a9d Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Mon, 8 Oct 2007 12:46:14 +0000
Subject: Don't stop reading dir contents on errors

---
 src/librc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/librc.c b/src/librc.c
index 3138efc3..43809e2a 100644
--- a/src/librc.c
+++ b/src/librc.c
@@ -54,8 +54,7 @@ static char **ls_dir (const char *dir, int options)
 	if ((dp = opendir (dir)) == NULL) 
 		return (NULL);
 
-	errno = 0;
-	while (((d = readdir (dp)) != NULL) && errno == 0) {
+	while (((d = readdir (dp)) != NULL)) {
 		if (d->d_name[0] != '.') {
 			if (options & LS_INITD) {
 				int l = strlen (d->d_name);
-- 
cgit v1.2.3