aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-10-22 16:33:59 +0100
committersin <sin@2f30.org>2014-10-22 16:34:16 +0100
commitb06a4d4eeb7d95af4f0b0b02a5cfe21b3e9de69d (patch)
tree5622f965772731272509a0855bc7e64235d74b93 /noice.c
parentce599b8e6bf44d089820b5b5558835e57f67db7b (diff)
downloadnoice-b06a4d4eeb7d95af4f0b0b02a5cfe21b3e9de69d.tar.gz
Initialize `n' and `dents'
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/noice.c b/noice.c
index a2599d7..48ee105 100644
--- a/noice.c
+++ b/noice.c
@@ -497,6 +497,10 @@ browse(const char *ipath, const char *ifilter)
cur = 0;
begin:
+ /* Path and filter should be malloc(3)-ed strings at all times */
+ n = 0;
+ dents = NULL;
+
dirp = opendir(path);
if (dirp == NULL) {
printwarn();
@@ -511,7 +515,6 @@ begin:
if (r != 0)
goto nochange;
- dents = NULL;
n = dentfill(dirp, &dents, visible, &filter_re);
/* Make sure cur is in range */
Un proyecto texto-plano.xyz