summaryrefslogtreecommitdiff
path: root/src/librc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-08 12:46:14 +0000
committerRoy Marples <roy@marples.name>2007-10-08 12:46:14 +0000
commit3da29223584b1a336be6ba6c257f748196146a9d (patch)
treec77bf3370c8fc7fd91dcc0fb02a86f6ca8205e6c /src/librc.c
parentcd4bce7e8da691b8be0a88292eee13852b826b7e (diff)
downloadopenrc-3da29223584b1a336be6ba6c257f748196146a9d.tar.gz
openrc-3da29223584b1a336be6ba6c257f748196146a9d.tar.bz2
openrc-3da29223584b1a336be6ba6c257f748196146a9d.tar.xz
Don't stop reading dir contents on errors
Diffstat (limited to 'src/librc.c')
-rw-r--r--src/librc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librc.c b/src/librc.c
index 3138efc..43809e2 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);