Skip to content

Commit

Permalink
Fix signedness on return value from xread()
Browse files Browse the repository at this point in the history
The return value from xread() is ssize_t.
Paolo Teti <[email protected]> pointed out that in this case, the
signed return value was assigned to an unsigned type (size_t). This patch
fixes that.

Signed-off-by: Johan Herland <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
jherland authored and Junio C Hamano committed May 16, 2007
1 parent af9b54b commit 2924415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pack-write.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void fixup_pack_header_footer(int pack_fd,

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 2924415

Please sign in to comment.