aboutsummaryrefslogtreecommitdiff
path: root/fsck-cache.c
diff options
context:
space:
mode:
authorPetr Baudis <pasky@ucw.cz>2005-04-13 02:28:48 -0700
committerPetr Baudis <xpasky@machine>2005-04-13 02:28:48 -0700
commit2de381f919829aec1e35d6c7cc33519295dcd053 (patch)
tree3f703cd0cd32a4aa9892bda84c664c36e40f7921 /fsck-cache.c
parentbdd4da595a265a091a859754a22688f7351cddee (diff)
downloadgit-2de381f919829aec1e35d6c7cc33519295dcd053.tar.gz
git-2de381f919829aec1e35d6c7cc33519295dcd053.tar.xz
[PATCH] Consolidate the error handling
Now there is error() for "library" errors and die() for fatal "application" errors. usage() is now used strictly only for usage errors. Signed-off-by: Petr Baudis <pasky@ucw.cz>
Diffstat (limited to 'fsck-cache.c')
-rw-r--r--fsck-cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index bb5cf196a..2bb3a64a3 100644
--- a/fsck-cache.c
+++ b/fsck-cache.c
@@ -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) {