projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a56da2
)
write_in_full: size_t is unsigned.
author
Junio C Hamano
<junkio@cox.net>
Sat, 27 Jan 2007 01:39:03 +0000
(17:39 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 27 Jan 2007 01:39:03 +0000
(17:39 -0800)
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>
write_or_die.c
patch
|
blob
|
history
diff --git
a/write_or_die.c
b/write_or_die.c
index 046e79d485feaa26d305868012f73b04088366b6..5c4bc8515ab9484131de7e065e08657315004f8c 100644
(file)
--- 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);
+ s
s
ize_t written = xwrite(fd, p, count);
if (written < 0)
return -1;
if (!written) {