git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Nicolas Pitre <nico@cam.org>
Subject: [PATCH 3/6] sha1_file.c: don't ignore an error condition in sha1_loose_object_info()
Date: Mon, 26 Feb 2007 14:55:57 -0500	[thread overview]
Message-ID: <11725197622423-git-send-email-nico@cam.org> (raw)
In-Reply-To: <11725197613482-git-send-email-nico@cam.org>

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 sha1_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sha1_file.c b/sha1_file.c
index 8147a4f..8b7b68c 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1461,7 +1461,7 @@ static int sha1_loose_object_info(const unsigned char *sha1, char *type, unsigne
 	if (unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr)) < 0)
 		status = error("unable to unpack %s header",
 			       sha1_to_hex(sha1));
-	if (parse_sha1_header(hdr, type, &size) < 0)
+	else if (parse_sha1_header(hdr, type, &size) < 0)
 		status = error("unable to parse %s header", sha1_to_hex(sha1));
 	else {
 		status = 0;
-- 
1.5.0.572.ge86d

  reply	other threads:[~2007-02-26 19:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 19:55 various cleanups Nicolas Pitre
2007-02-26 19:55 ` [PATCH 1/6] sha1_file.c: cleanup hdr usage Nicolas Pitre
2007-02-26 19:55   ` [PATCH 2/6] sha1_file.c: cleanup "offset" usage Nicolas Pitre
2007-02-26 19:55     ` Nicolas Pitre [this message]
2007-02-26 19:55       ` [PATCH 4/6] formalize typename(), and add its reverse type_from_string() Nicolas Pitre
2007-02-26 19:55         ` [PATCH 5/6] convert object type handling from a string to a number Nicolas Pitre
2007-02-26 19:56           ` [PATCH 6/6] get rid of lookup_object_type() Nicolas Pitre
2007-02-27 10:35           ` [PATCH 5/6] convert object type handling from a string to a number Junio C Hamano
2007-02-27 10:53             ` Junio C Hamano
2007-02-27 14:06               ` Nicolas Pitre
2007-02-27 13:58             ` Nicolas Pitre
2007-02-27 16:24               ` Linus Torvalds
2007-02-27 17:26                 ` Nicolas Pitre
2007-02-27 15:01             ` Shawn O. Pearce
2007-02-27 15:33               ` Nicolas Pitre
2007-02-27 16:07                 ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11725197622423-git-send-email-nico@cam.org \
    --to=nico@cam.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).