]> Sergey Matveev's repositories - nnn.git/commitdiff
Minor refactor
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 22 Feb 2020 13:12:55 +0000 (18:42 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 22 Feb 2020 13:12:55 +0000 (18:42 +0530)
src/nnn.c

index a942ebdac384a4138ef3988a68082fd0020bd266..ae7a906d7011e85570d81fdf2cb099092e5e3e19 100644 (file)
--- 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();
        }