aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar lostd <lostd@2f30.org>2014-10-10 13:24:19 +0300
committerGravatar lostd <lostd@2f30.org>2014-10-10 13:24:19 +0300
commit11bebdf23e4c2dd6015f949b65f802f36cedc06c (patch)
tree4dd669e1b081a2c71365a8798fcf054396d0c779
parentf05f98e4feb9a6100301800870c74365c5430ac9 (diff)
downloadnnn-11bebdf23e4c2dd6015f949b65f802f36cedc06c.tar.gz
The dirp should be initialized here
-rw-r--r--noice.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/noice.c b/noice.c
index f224c96..5916fca 100644
--- a/noice.c
+++ b/noice.c
@@ -555,11 +555,10 @@ out:
free(dents[i].name);
free(dents);
- if (dirp != NULL) {
- r = closedir(dirp);
- if (r == -1)
- printerr(1, "closedir");
- }
+ /* Should never be null */
+ r = closedir(dirp);
+ if (r == -1)
+ printerr(1, "closedir");
goto begin;
}