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 <johan@herland.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Johan Herland
2007-05-15 14:49:22 +02:00
committed by Junio C Hamano
parent 2924415f4f
commit 8a912bcb25
12 changed files with 15 additions and 16 deletions

3
copy.c
View File

@ -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) {