{"thread":{"id":"12083","subject":"[PATCH] diff.c: replace a 'strdup' with 'xstrdup'.","startedAt":"2008-02-14T05:50:00Z","lastAt":"2008-02-15T17:11:07Z","messageCount":2,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"68704","messageId":"20080214065000.083c3617.chriscool@tuxfamily.org","threadId":"12083","inReplyTo":null,"subject":"[PATCH] diff.c: replace a 'strdup' with 'xstrdup'.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-14T05:50:00Z","receivedAt":"2008-02-14T05:50:00Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n diff.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n\tBy the way perhaps the \n\n \t\treturn error(\"%s: lacks value\", var);\n\n\tshould also be changed to\n\n\t\treturn config_error_nonbool(var);\n\n\tor the check could be removed because there is\n\talready a check line 171 just before\n\t'parse_lldiff_command' is called.\n\ndiff --git a/diff.c b/diff.c\nindex cd8bc4d..e5db293 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -88,7 +88,7 @@ static int parse_lldiff_command(const char *var, const char *ep, const char *val\n \n \tif (!value)\n \t\treturn error(\"%s: lacks value\", var);\n-\tdrv->cmd = strdup(value);\n+\tdrv->cmd = xstrdup(value);\n \treturn 0;\n }\n \n-- \n1.5.4.20.gc135a-dirty\n"},{"id":"68817","messageId":"7vlk5mi1qs.fsf@gitster.siamese.dyndns.org","threadId":"12083","inReplyTo":"20080214065000.083c3617.chriscool@tuxfamily.org","subject":"Re: [PATCH] diff.c: replace a 'strdup' with 'xstrdup'.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-15T17:11:07Z","receivedAt":"2008-02-15T17:11:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> \tBy the way perhaps the \n>\n>  \t\treturn error(\"%s: lacks value\", var);\n>\n> \tshould also be changed to\n>\n> \t\treturn config_error_nonbool(var);\n\nGood eyes.  That probably should go to 'maint' for consistency.\n"}]}