@matheusbsbs / matheus-bagliano / commits / d848804a89
Fork 0

write_in_full: size_t is unsigned.

It received the return value from xwrite() in a size_t variable 'written' and expected comparison with 0 would catch an error from xwrite(). Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 26, 2007 at 17:39 UTC d848804a895254583095b5c23ebb5d5f5a8891a3
1 file changed +1 -1
write_or_die.c
+1 -1
@@ -23,7 +23,7 @@ int write_in_full(int fd, const void *buf, size_t count)
23 ssize_t total = 0;
24
25 while (count > 0) {
26 - size_t written = xwrite(fd, p, count);
26 + ssize_t written = xwrite(fd, p, count);
27 if (written < 0)
28 return -1;
29 if (!written) {