Fix uip/whom.c for C89 compatibility
[mmh] / uip / ali.c
index d6a480c..d4c6c7f 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -40,6 +40,8 @@ static struct swit switches[] = {
        { NULL, 0 }
 };
 
+char *version=VERSION;
+
 static int pos = 1;
 
 extern struct aka *akahead;
@@ -125,7 +127,7 @@ main(int argc, char **argv)
        if (deffiles && (cp = context_find("Aliasfile"))) {
                char *dp = NULL;
 
-               for (ap = brkstring(dp=getcpy(cp), " ", "\n");
+               for (ap = brkstring(dp=mh_xstrdup(cp), " ", "\n");
                                ap && *ap; ap++) {
                        if ((i = alias(etcpath(*ap))) != AK_OK) {
                                adios(EX_DATAERR, NULL, "aliasing error in %s: %s",
@@ -230,7 +232,7 @@ print_usr(char *s, int list, int norm)
                        if (!mh_strcasecmp(mp->m_host, np->m_host)
                                        && !mh_strcasecmp(mp->m_mbox, np->m_mbox)) {
                                vp = vp ? add(ak->ak_name, add(",", vp))
-                                       : getcpy(ak->ak_name);
+                                       : mh_xstrdup(ak->ak_name);
                                mnfree(np);
                                while (getname(""))
                                        continue;