From: Ralph Corderoy Date: Tue, 18 Oct 2016 13:52:25 +0000 (+0100) Subject: Replace getcpy() with mh_xstrdup() where the string isn't NULL. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/c9e182de1cb1448fdc313cd08c3e0c3fd5e3938d?hp=b66f48b0d0caea86ac3ae5e5044e3340be22f1a6 Replace getcpy() with mh_xstrdup() where the string isn't NULL. --- diff --git a/uip/ali.c b/uip/ali.c index abc7f556..158e7ef3 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -117,7 +117,7 @@ main (int argc, char **argv) if ((cp = context_find ("Aliasfile"))) { char *dp = NULL; - for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) + for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) if ((i = alias (*ap)) != AK_OK) adios (NULL, "aliasing error in %s - %s", *ap, akerror (i)); if (dp)