From: Christian Couder <chriscool@tuxfamily.org>
To: Junio Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] diff.c: replace a 'strdup' with 'xstrdup'.
Date: Thu, 14 Feb 2008 06:50:00 +0100 [thread overview]
Message-ID: <20080214065000.083c3617.chriscool@tuxfamily.org> (raw)
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
diff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
By the way perhaps the
return error("%s: lacks value", var);
should also be changed to
return config_error_nonbool(var);
or the check could be removed because there is
already a check line 171 just before
'parse_lldiff_command' is called.
diff --git a/diff.c b/diff.c
index cd8bc4d..e5db293 100644
--- a/diff.c
+++ b/diff.c
@@ -88,7 +88,7 @@ static int parse_lldiff_command(const char *var, const char *ep, const char *val
if (!value)
return error("%s: lacks value", var);
- drv->cmd = strdup(value);
+ drv->cmd = xstrdup(value);
return 0;
}
--
1.5.4.20.gc135a-dirty
next reply other threads:[~2008-02-14 5:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 5:50 Christian Couder [this message]
2008-02-15 17:11 ` [PATCH] diff.c: replace a 'strdup' with 'xstrdup' Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080214065000.083c3617.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).