Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
real_pathdup(): fix callsites that wanted it to die on error
[gitweb.git]
/
tempfile.c
diff --git
a/tempfile.c
b/tempfile.c
index 2990c92424832d288d5bbab2dfe79b5db361e0b0..ffcc2723755f1b97dd6626ed7c13801f905fdf18 100644
(file)
--- a/
tempfile.c
+++ b/
tempfile.c
@@
-247,12
+247,8
@@
int close_tempfile(struct tempfile *tempfile)
tempfile->fd = -1;
if (fp) {
tempfile->fp = NULL;
-
- /*
- * Note: no short-circuiting here; we want to fclose()
- * in any case!
- */
- err = ferror(fp) | fclose(fp);
+ err = ferror(fp);
+ err |= fclose(fp);
} else {
err = close(fd);
}