aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--object-file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/object-file.c b/object-file.c
index b5d1d12b68..52e4ae1b5f 100644
--- a/object-file.c
+++ b/object-file.c
@@ -2623,12 +2623,8 @@ int read_loose_object(const char *path,
goto out;
}
- switch (unpack_loose_header(&stream, map, mapsize, hdr, sizeof(hdr),
- NULL)) {
- case ULHR_OK:
- break;
- case ULHR_BAD:
- case ULHR_TOO_LONG:
+ if (unpack_loose_header(&stream, map, mapsize, hdr, sizeof(hdr),
+ NULL) != ULHR_OK) {
error(_("unable to unpack header of %s"), path);
goto out;
}