summaryrefslogtreecommitdiff
path: root/object-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/object-file.c b/object-file.c
index 2a1f3386f6..857f3bdeba 100644
--- a/object-file.c
+++ b/object-file.c
@@ -2628,12 +2628,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;
}