Replace getcpy() and strdup() with mh_xstrdup()
[mmh] / uip / spost.c
index e2b5a88..aacb633 100644 (file)
@@ -211,7 +211,7 @@ main(int argc, char **argv)
                verbose++;
                out = stdout;
        } else {
-               tmpfil = getcpy(m_mktemp2("/tmp/", invo_name, NULL, &out));
+               tmpfil = mh_xstrdup(m_mktemp2("/tmp/", invo_name, NULL, &out));
        }
 
        /* check for "Aliasfile:" profile entry */
@@ -219,7 +219,7 @@ main(int argc, char **argv)
                char *dp, **ap; 
 
                aliasflg = 1;
-               for (ap=brkstring(dp=getcpy(cp), " ", "\n"); ap && *ap;
+               for (ap=brkstring(dp=mh_xstrdup(cp), " ", "\n"); ap && *ap;
                                ap++) {
                        if ((state = alias(etcpath(*ap))) != AK_OK) {
                                adios(EX_IOERR, NULL, "aliasing error in file %s: %s",
@@ -236,7 +236,7 @@ main(int argc, char **argv)
                case FLD:
                case FLDPLUS:
                        compnum++;
-                       cp = getcpy(buf);
+                       cp = mh_xstrdup(buf);
                        while (state == FLDPLUS) {
                                state = m_getfld(state, name, buf,
                                                sizeof(buf), in);
@@ -329,7 +329,7 @@ main(int argc, char **argv)
        }
 
        while (recipients != NULL) {
-               cp = getcpy(recipients->m_mbox);
+               cp = mh_xstrdup(recipients->m_mbox);
                if (recipients->m_host) {
                        cp = add("@", cp);
                        cp = add(recipients->m_host, cp);
@@ -405,7 +405,7 @@ putfmt(char *name, char *str, FILE *out)
        }
 
        if (hdr->flags & HSUB) {
-               subject = getcpy(str);
+               subject = mh_xstrdup(str);
        }
 
        if (!(hdr->flags & HADR)) {
@@ -551,7 +551,7 @@ putadr(char *name, struct mailname *nl)
                }
                if (mp->m_ingrp) {
                        if (mp->m_gname != NULL) {
-                               cp = getcpy(mp->m_gname);
+                               cp = mh_xstrdup(mp->m_gname);
                                cp = add(";", cp);
                                linepos = putone(cp, linepos, namelen);
                                mh_free0(&cp);
@@ -666,7 +666,7 @@ process_bccs(char *origmsg)
        FILE *out = NULL;
 
        for (mp=bccs; mp; mp=mp->m_next) {
-               bccdraft = getcpy(m_mktemp2("/tmp/", invo_name, NULL, &out));
+               bccdraft = mh_xstrdup(m_mktemp2("/tmp/", invo_name, NULL, &out));
                fprintf(out, "To: %s\n", mp->m_text);
                if (from) {
                        fprintf(out, "From: %s\n", from->m_text);