* [PATCH] diff.c: replace a 'strdup' with 'xstrdup'.
@ 2008-02-14 5:50 Christian Couder
2008-02-15 17:11 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Christian Couder @ 2008-02-14 5:50 UTC (permalink / raw)
To: Junio Hamano; +Cc: git
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] diff.c: replace a 'strdup' with 'xstrdup'.
2008-02-14 5:50 [PATCH] diff.c: replace a 'strdup' with 'xstrdup' Christian Couder
@ 2008-02-15 17:11 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2008-02-15 17:11 UTC (permalink / raw)
To: Christian Couder; +Cc: git
Christian Couder <chriscool@tuxfamily.org> writes:
> By the way perhaps the
>
> return error("%s: lacks value", var);
>
> should also be changed to
>
> return config_error_nonbool(var);
Good eyes. That probably should go to 'maint' for consistency.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-15 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 5:50 [PATCH] diff.c: replace a 'strdup' with 'xstrdup' Christian Couder
2008-02-15 17:11 ` Junio C Hamano
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).