Skip to content

Commit d8c8dcc

Browse files
committed
Merge branch 'ds/object-file-unpack-loose-header-fix'
Coding style fix. * ds/object-file-unpack-loose-header-fix: object-file: convert 'switch' back to 'if'
2 parents a9e7c3a + 8a50571 commit d8c8dcc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

object-file.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,12 +2628,8 @@ int read_loose_object(const char *path,
26282628
goto out;
26292629
}
26302630

2631-
switch (unpack_loose_header(&stream, map, mapsize, hdr, sizeof(hdr),
2632-
NULL)) {
2633-
case ULHR_OK:
2634-
break;
2635-
case ULHR_BAD:
2636-
case ULHR_TOO_LONG:
2631+
if (unpack_loose_header(&stream, map, mapsize, hdr, sizeof(hdr),
2632+
NULL) != ULHR_OK) {
26372633
error(_("unable to unpack header of %s"), path);
26382634
goto out;
26392635
}

0 commit comments

Comments
 (0)