diff options
author | Jim Meyering <jim@meyering.net> | 2007-06-27 16:28:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-27 21:02:44 -0700 |
commit | f57882505efe05990102a0d96b37c09baadae03d (patch) | |
tree | 416b045a8020aaf06209f1883d0e4fb10d68c204 /builtin-log.c | |
parent | 5483c71d7ac06b4f16c646886abbb2d0f88a2855 (diff) | |
download | git-f57882505efe05990102a0d96b37c09baadae03d.tar.gz |
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.c | 2 |
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) { |