@matheusbsbs / matheus-bagliano / commits / 2924415f4f
Fork 0

Fix signedness on return value from xread()

The return value from xread() is ssize_t. Paolo Teti <paolo.teti@gmail.com> 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 <johan@herland.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johan Herland committed May 15, 2007 at 14:39 UTC 2924415f4fb081d9dde687092248c86ec0c40195
1 file changed +1 -1
pack-write.c
+1 -1
@@ -25,7 +25,7 @@ void fixup_pack_header_footer(int pack_fd,
25
26 buf = xmalloc(buf_sz);
27 for (;;) {
28 - size_t n = xread(pack_fd, buf, buf_sz);
28 + ssize_t n = xread(pack_fd, buf, buf_sz);
29 if (!n)
30 break;
31 if (n < 0)