diff options
author | James Bowes <jbowes@dangerouslyinc.com> | 2007-03-19 22:42:40 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-20 02:16:03 +0100 |
commit | 567fb65e251d946cee2b73a9b188231652fe663c (patch) | |
tree | 348b2eaa37c98527f3b817add17010fb82d05396 | |
parent | use a LRU eviction policy for the delta base cache (diff) | |
download | git-567fb65e251d946cee2b73a9b188231652fe663c.tar.xz git-567fb65e251d946cee2b73a9b188231652fe663c.zip |
Replace remaining instances of strdup with xstrdup.
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | builtin-log.c | 2 | ||||
-rw-r--r-- | commit.c | 2 | ||||
-rw-r--r-- | revision.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/builtin-log.c b/builtin-log.c index 865832c85e..71df957eaa 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 = ""; } @@ -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 bcdb6a1212..c680dcb8ba 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; |