Skip to content

Commit

Permalink
use xstrdup please
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Mar 16, 2007
1 parent 9debc32 commit dbb2b41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ int git_default_config(const char *var, const char *value)
}

if (!strcmp(var, "i18n.commitencoding")) {
git_commit_encoding = strdup(value);
git_commit_encoding = xstrdup(value);
return 0;
}

if (!strcmp(var, "i18n.logoutputencoding")) {
git_log_output_encoding = strdup(value);
git_log_output_encoding = xstrdup(value);
return 0;
}

Expand Down

0 comments on commit dbb2b41

Please sign in to comment.