mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Initialize n' and
dents'
This commit is contained in:
parent
ce599b8e6b
commit
b06a4d4eeb
5
noice.c
5
noice.c
|
@ -497,6 +497,10 @@ browse(const char *ipath, const char *ifilter)
|
||||||
|
|
||||||
cur = 0;
|
cur = 0;
|
||||||
begin:
|
begin:
|
||||||
|
/* Path and filter should be malloc(3)-ed strings at all times */
|
||||||
|
n = 0;
|
||||||
|
dents = NULL;
|
||||||
|
|
||||||
dirp = opendir(path);
|
dirp = opendir(path);
|
||||||
if (dirp == NULL) {
|
if (dirp == NULL) {
|
||||||
printwarn();
|
printwarn();
|
||||||
|
@ -511,7 +515,6 @@ begin:
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
||||||
dents = NULL;
|
|
||||||
n = dentfill(dirp, &dents, visible, &filter_re);
|
n = dentfill(dirp, &dents, visible, &filter_re);
|
||||||
|
|
||||||
/* Make sure cur is in range */
|
/* Make sure cur is in range */
|
||||||
|
|
Loading…
Reference in a new issue