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>maint
parent
8a56da2962
commit
d848804a89
|
@ -23,7 +23,7 @@ int write_in_full(int fd, const void *buf, size_t count)
|
||||||
ssize_t total = 0;
|
ssize_t total = 0;
|
||||||
|
|
||||||
while (count > 0) {
|
while (count > 0) {
|
||||||
size_t written = xwrite(fd, p, count);
|
ssize_t written = xwrite(fd, p, count);
|
||||||
if (written < 0)
|
if (written < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (!written) {
|
if (!written) {
|
||||||
|
|
Loading…
Reference in New Issue