From: Arun Prakash Jana Date: Sat, 22 Feb 2020 13:12:55 +0000 (+0530) Subject: Minor refactor X-Git-Tag: v3.1~153 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=04ab3751af837b74ff73c989cff3eca8f2fd69c5;p=nnn.git Minor refactor --- diff --git a/src/nnn.c b/src/nnn.c index a942ebda..ae7a906d 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4252,16 +4252,13 @@ static int dentfill(char *path, struct entry **dents) dir_blocks = 0; buf = (char *)alloca(strlen(path) + NAME_MAX + 2); - if (fstatat(fd, path, &sb_path, 0) == -1) { - closedir(dirp); - printwarn(NULL); - return 0; - } + if (fstatat(fd, path, &sb_path, 0) == -1) + goto exit; if (!ihashbmp) { ihashbmp = calloc(1, HASH_OCTETS << 3); if (!ihashbmp) - return 0; + goto exit; } else clear_hash(); }