]> diplodocus.org Git - nmh/commitdiff
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)
uip/ali.c

index abc7f556500353fa7cd7cfe8e0a29f61b7c75b32..158e7ef346164fec4c8c7c951840efd42d688395 100644 (file)
--- 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;
 
        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)
                if ((i = alias (*ap)) != AK_OK)
                    adios (NULL, "aliasing error in %s - %s", *ap, akerror (i));
            if (dp)