From: Ralph Corderoy Date: Tue, 18 Oct 2016 12:37:14 +0000 (+0100) Subject: Replace getcpy() with mh_xstrdup() where the string isn't NULL. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/75cb75e930551c2a611183d96b22ae225ff3113f?ds=inline Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 4f60cebb..10d3e575 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -290,7 +290,7 @@ static struct colormap colortable[] = { /* Add new component to the hash table */ #define NEWCOMP(cm,name) do { \ NEW0(cm);\ - cm->c_name = getcpy(name);\ + cm->c_name = mh_xstrdup(name);\ cm->c_refcount++;\ ncomp++;\ i = CHASH(name);\ @@ -393,7 +393,7 @@ fmt_compile(char *fstring, struct format **fmt, int reset_comptable) size_t i; static int comptable_initialized = 0; - format_string = getcpy (fstring); + format_string = mh_xstrdup(fstring); usr_fstring = fstring; if (reset_comptable || !comptable_initialized) {