From: James Bowes Date: Mon, 19 Mar 2007 21:42:40 +0000 (-0400) Subject: Replace remaining instances of strdup with xstrdup. X-Git-Tag: v1.5.1-rc2~58 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=567fb65e251d946cee2b73a9b188231652fe663c;p=git.git Replace remaining instances of strdup with xstrdup. Signed-off-by: James Bowes Signed-off-by: Junio C Hamano --- diff --git a/builtin-log.c b/builtin-log.c index 865832c85..71df957ea 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -35,7 +35,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix, if (!prefixcmp(arg, "--encoding=")) { arg += 11; if (strcmp(arg, "none")) - git_log_output_encoding = strdup(arg); + git_log_output_encoding = xstrdup(arg); else git_log_output_encoding = ""; } diff --git a/commit.c b/commit.c index 5b9234e12..718e56885 100644 --- a/commit.c +++ b/commit.c @@ -706,7 +706,7 @@ static char *logmsg_reencode(const struct commit *commit, encoding = get_header(commit, "encoding"); use_encoding = encoding ? encoding : utf8; if (!strcmp(use_encoding, output_encoding)) - out = strdup(commit->buffer); + out = xstrdup(commit->buffer); else out = reencode_string(commit->buffer, output_encoding, use_encoding); diff --git a/revision.c b/revision.c index bcdb6a121..c680dcb8b 100644 --- a/revision.c +++ b/revision.c @@ -1038,7 +1038,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch if (!prefixcmp(arg, "--encoding=")) { arg += 11; if (strcmp(arg, "none")) - git_log_output_encoding = strdup(arg); + git_log_output_encoding = xstrdup(arg); else git_log_output_encoding = ""; continue;