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 --- copy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'copy.c') diff --git a/copy.c b/copy.c index 08a3d388a4..d340bb253e 100644 --- a/copy.c +++ b/copy.c @@ -3,10 +3,9 @@ int copy_fd(int ifd, int ofd) { while (1) { - int len; char buffer[8192]; char *buf = buffer; - len = xread(ifd, buffer, sizeof(buffer)); + ssize_t len = xread(ifd, buffer, sizeof(buffer)); if (!len) break; if (len < 0) { -- cgit v1.2.3