@matheusbsbs / matheus-bagliano / commits / 9ba630318f
Fork 0

sha1_file.c: don't ignore an error condition in sha1_loose_object_info()

Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Nicolas Pitre committed Feb 26, 2007 at 14:55 UTC 9ba630318f6fbc2f129e5a6872d70d2914cacb39
1 file changed +1 -1
sha1_file.c
+1 -1
@@ -1461,7 +1461,7 @@ static int sha1_loose_object_info(const unsigned char *sha1, char *type, unsigne
1461 if (unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr)) < 0)
1462 status = error("unable to unpack %s header",
1463 sha1_to_hex(sha1));
1464 - if (parse_sha1_header(hdr, type, &size) < 0)
1464 + else if (parse_sha1_header(hdr, type, &size) < 0)
1465 status = error("unable to parse %s header", sha1_to_hex(sha1));
1466 else {
1467 status = 0;