Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
avoid "write_in_full(fd, buf, len) != len" pattern
[gitweb.git]
/
diff.c
diff --git
a/diff.c
b/diff.c
index 9c382580306e340ed6333f96bc4919c4c507a7b9..6f58bca2f9256ae4ff413db5a13eb249866945e5 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-2975,7
+2975,7
@@
static void prep_temp_blob(const char *path, struct diff_tempfile *temp,
blob = buf.buf;
size = buf.len;
}
- if (write_in_full(fd, blob, size)
!= size
)
+ if (write_in_full(fd, blob, size)
< 0
)
die_errno("unable to write temp-file");
close_tempfile(&temp->tempfile);
temp->name = get_tempfile_path(&temp->tempfile);