diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-06-03 14:30:35 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-03 14:30:35 -0700 |
commit | d8c8dccbaafd35879493a95840ae52153f1d1136 (patch) | |
tree | cf36ccc5f2f10daf2e650cbae2ce1e2bd6ca499c /object-file.c | |
parent | a9e7c3a6efebcb96a987db7514751e9f52985399 (diff) | |
parent | 8a50571a0ea700fe2b9a3c7ef7ed2117c87ca9ba (diff) | |
download | git-d8c8dccbaafd35879493a95840ae52153f1d1136.tar.gz |
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'
Diffstat (limited to 'object-file.c')
-rw-r--r-- | object-file.c | 8 |
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; } |