Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-04 00:30:35 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-04 00:30:35 +0300
commitd8c8dccbaafd35879493a95840ae52153f1d1136 (patch)
treecf36ccc5f2f10daf2e650cbae2ce1e2bd6ca499c /object-file.c
parenta9e7c3a6efebcb96a987db7514751e9f52985399 (diff)
parent8a50571a0ea700fe2b9a3c7ef7ed2117c87ca9ba (diff)
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.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;
}