Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-06-27 18:28:53 +0400
committerJunio C Hamano <gitster@pobox.com>2007-06-28 08:02:44 +0400
commitf57882505efe05990102a0d96b37c09baadae03d (patch)
tree416b045a8020aaf06209f1883d0e4fb10d68c204 /builtin-log.c
parent5483c71d7ac06b4f16c646886abbb2d0f88a2855 (diff)
git-log: detect dup and fdopen failure
This defines xdup() and xfdopen() in git-compat-util.h to give us error-catching variants of them without cluttering the code too much. Signed-off-by: Jim Meyering <jim@meyering.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 073a2a16a3..a4186eac8e 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -589,7 +589,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
get_patch_ids(&rev, &ids, prefix);
if (!use_stdout)
- realstdout = fdopen(dup(1), "w");
+ realstdout = xfdopen(xdup(1), "w");
prepare_revision_walk(&rev);
while ((commit = get_revision(&rev)) != NULL) {