git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove unnecessary test and dead diagnostic
@ 2011-05-26 13:59 Jim Meyering
  2011-05-26 14:11 ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Jim Meyering @ 2011-05-26 13:59 UTC (permalink / raw)
  To: git list


* sha1_file.c (index_stream): Don't check for size_t < 0.
read_in_full does not return an indication of failure.

Signed-off-by: Jim Meyering <meyering@redhat.com>
---
 sha1_file.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sha1_file.c b/sha1_file.c
index 5fc877f..ea4549c 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2736,8 +2736,6 @@ static int index_stream(unsigned char *sha1, int fd, size_t size,
 		size_t actual;

 		actual = read_in_full(fd, buf, sz);
-		if (actual < 0)
-			die_errno("index-stream: reading input");
 		if (write_in_full(fast_import.in, buf, actual) != actual)
 			die_errno("index-stream: feeding fast-import");
 		size -= actual;
--
1.7.5.2.660.g9f46c

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-05-26 21:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 13:59 [PATCH] remove unnecessary test and dead diagnostic Jim Meyering
2011-05-26 14:11 ` Jeff King
2011-05-26 14:34   ` Jim Meyering
2011-05-26 16:28     ` Jeff King
2011-05-26 14:37   ` Jim Meyering
2011-05-26 16:30     ` [PATCH] read_in_full: always report errors Jeff King
2011-05-26 18:35       ` Junio C Hamano
2011-05-26 18:48         ` Jeff King
2011-05-26 20:53           ` Junio C Hamano
2011-05-26 21:04             ` Jeff King

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).