]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fsck-cache.c
[PATCH] Consolidate the error handling
[thirdparty/git.git] / fsck-cache.c
index bb5cf196af7f06a3aea6fcfc5941565110c94b27..2bb3a64a3b1e78d78d97ed0ca905b67615e8966a 100644 (file)
@@ -205,8 +205,7 @@ static int fsck_dir(int i, char *path)
        struct dirent *de;
 
        if (!dir) {
-               fprintf(stderr, "missing sha1 directory '%s'", path);
-               return -1;
+               return error("missing sha1 directory '%s'", path);
        }
 
        while ((de = readdir(dir)) != NULL) {