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]
/
refs.c
diff --git
a/refs.c
b/refs.c
index ea2b9f84f8d3fab5452105f10f4492d672cd1d90..a5abca04b7888e1813942136955f0f7dd25efaa9 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-592,7
+592,7
@@
static int write_pseudoref(const char *pseudoref, const unsigned char *sha1,
}
}
- if (write_in_full(fd, buf.buf, buf.len)
!= buf.len
) {
+ if (write_in_full(fd, buf.buf, buf.len)
< 0
) {
strbuf_addf(err, "could not write to '%s'", filename);
rollback_lock_file(&lock);
goto done;