Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
sscanf/strtoul: parse integers robustly
[gitweb.git]
/
sha1_file.c
diff --git
a/sha1_file.c
b/sha1_file.c
index 42aef331f2e028d625dd2f6354cda2dfd55e71e0..9c260384201857eb32d07c87e1178fd3947968ee 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-2020,7
+2020,8
@@
int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha
if (write_buffer(fd, compressed, size) < 0)
die("unable to write sha1 file");
fchmod(fd, 0444);
- close(fd);
+ if (close(fd))
+ die("unable to write sha1 file");
free(compressed);
return move_temp_to_file(tmpfile, filename);