summaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index 8fd5c1f..2bcd2cc 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -54,7 +54,8 @@ procps_status_t * procps_scan(int save_user_arg0)
dir = xopendir("/proc");
}
for (;;) {
- if ((entry = readdir(dir)) == NULL) {
+ entry = readdir(dir);
+ if (entry == NULL) {
closedir(dir);
dir = 0;
return 0;