Skip to content

Commit

Permalink
fast-import: size_t vs ssize_t
Browse files Browse the repository at this point in the history
size_t is unsigned, so (n < 0) is never true.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Sami Farin authored and Shawn O. Pearce committed Apr 24, 2007
1 parent 46f6178 commit 00be8dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ static void fixup_header_footer(void)

buf = xmalloc(buf_sz);
for (;;) {
size_t n = xread(pack_fd, buf, buf_sz);
ssize_t n = xread(pack_fd, buf, buf_sz);
if (!n)
break;
if (n < 0)
Expand Down

0 comments on commit 00be8dc

Please sign in to comment.