]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Replace remaining instances of strdup with xstrdup.
authorJames Bowes <jbowes@dangerouslyinc.com>
Mon, 19 Mar 2007 21:42:40 +0000 (17:42 -0400)
committerJunio C Hamano <junkio@cox.net>
Tue, 20 Mar 2007 01:16:03 +0000 (18:16 -0700)
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-log.c
commit.c
revision.c

index 865832c85e8e860b328a5f5741e871b486fd89b6..71df957eaa0b85bd841fe3758b6efbfd51243881 100644 (file)
@@ -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 = "";
                }
index 5b9234e12e8d1ef46d0d53b15cea850dfbde14c2..718e568855a37586f99f20bcfafd44cf3aa2b657 100644 (file)
--- 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);
index bcdb6a12122871e743dd3b2362ca7bd5b1b787df..c680dcb8ba28bb8405cec06846592f5430e8f45b 100644 (file)
@@ -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;