summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2007-05-15 12:39:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-05-16 04:15:54 (GMT)
commit2924415f4fb081d9dde687092248c86ec0c40195 (patch)
treee81cf399b019741668bf0fb422953fe8c4c00a3e
parentaf9b54bb2cb0e15780bf3e820b5f1ce399deb2c4 (diff)
downloadgit-2924415f4fb081d9dde687092248c86ec0c40195.zip
git-2924415f4fb081d9dde687092248c86ec0c40195.tar.gz
git-2924415f4fb081d9dde687092248c86ec0c40195.tar.bz2
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>
-rw-r--r--pack-write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-write.c b/pack-write.c
index de72f44..ae2e481 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)