summaryrefslogtreecommitdiff
path: root/write_or_die.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-26 17:39:03 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-26 17:39:03 -0800
commitd848804a895254583095b5c23ebb5d5f5a8891a3 (patch)
tree7ee4725661a1d64630ba6af7079b5217949d30c8 /write_or_die.c
parent8a56da29628997289aa8ec888ba85889962393e4 (diff)
downloadgit-d848804a895254583095b5c23ebb5d5f5a8891a3.tar.gz
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>
Diffstat (limited to 'write_or_die.c')
-rw-r--r--write_or_die.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/write_or_die.c b/write_or_die.c
index 046e79d485..5c4bc8515a 100644
--- a/write_or_die.c
+++ b/write_or_die.c
@@ -23,7 +23,7 @@ int write_in_full(int fd, const void *buf, size_t count)
ssize_t total = 0;
while (count > 0) {
- size_t written = xwrite(fd, p, count);
+ ssize_t written = xwrite(fd, p, count);
if (written < 0)
return -1;
if (!written) {