From: Johan Herland Date: Tue, 15 May 2007 12:39:25 +0000 (+0200) Subject: Fix signedness on return value from xread() X-Git-Tag: v1.5.2~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2924415f4fb081d9dde687092248c86ec0c40195;p=git.git Fix signedness on return value from xread() The return value from xread() is ssize_t. Paolo Teti 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 Signed-off-by: Junio C Hamano --- diff --git a/pack-write.c b/pack-write.c index de72f44dc..ae2e481e5 100644 --- a/pack-write.c +++ b/pack-write.c @@ -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)