Skip to content
Browse files

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>
  • Loading branch information...
1 parent af9b54b commit 2924415f4fb081d9dde687092248c86ec0c40195 @jherland jherland committed with Junio C Hamano May 15, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 pack-write.c
View
2 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)

0 comments on commit 2924415

Please sign in to comment.
Something went wrong with that request. Please try again.