From 8a912bcb250d8bf57b225e1cf02c0d69d54c8920 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Tue, 15 May 2007 14:49:22 +0200 Subject: Ensure return value from xread() is always stored into an ssize_t This patch fixes all calls to xread() where the return value is not stored into an ssize_t. The patch should not have any effect whatsoever, other than putting better/more appropriate type names on variables. Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- builtin-fetch--tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-fetch--tool.c') diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c index 2065466f27..12adb3833c 100644 --- a/builtin-fetch--tool.c +++ b/builtin-fetch--tool.c @@ -6,11 +6,11 @@ static char *get_stdin(void) { - int offset = 0; + size_t offset = 0; char *data = xmalloc(CHUNK_SIZE); while (1) { - int cnt = xread(0, data + offset, CHUNK_SIZE); + ssize_t cnt = xread(0, data + offset, CHUNK_SIZE); if (cnt < 0) die("error reading standard input: %s", strerror(errno)); -- cgit v1.2.3