Skip to content

Commit dbb2b41

Browse files
spearceJunio C Hamano
authored andcommitted
use xstrdup please
We generally prefer xstrdup to just plain strdup. Make it so. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 9debc32 commit dbb2b41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,12 @@ int git_default_config(const char *var, const char *value)
351351
}
352352

353353
if (!strcmp(var, "i18n.commitencoding")) {
354-
git_commit_encoding = strdup(value);
354+
git_commit_encoding = xstrdup(value);
355355
return 0;
356356
}
357357

358358
if (!strcmp(var, "i18n.logoutputencoding")) {
359-
git_log_output_encoding = strdup(value);
359+
git_log_output_encoding = xstrdup(value);
360360
return 0;
361361
}
362362

0 commit comments

Comments
 (0)