summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33f0ea4)
raw | patch | inline | side by side (parent: 33f0ea4)
author | Larry D'Anna <larry@elder-gods.org> | |
Tue, 16 Feb 2010 04:10:45 +0000 (23:10 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 16 Feb 2010 05:46:01 +0000 (21:46 -0800) |
The return value from fopen wasn't being checked.
Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history |
index 17a2b4df2922427920d4bb896f173247f93433e4..8d8405aba29a4240f6a68c5fb1e3f0ad15050318 100644 (file)
--- a/diff.c
+++ b/diff.c
;
else if (!prefixcmp(arg, "--output=")) {
options->file = fopen(arg + strlen("--output="), "w");
+ if (!options->file)
+ die_errno("Could not open '%s'", arg + strlen("--output="));
options->close_file = 1;
} else
return 0;