]> diplodocus.org Git - nmh/blobdiff - uip/ap.c
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / uip / ap.c
index b124c306c9f9ac9f9a30ebc71a498e65068354d3..dff6dc4370e182ff8f6d3d1b8dc7b5448cf111c7 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -53,9 +53,9 @@ main (int argc, char **argv)
     char buf[BUFSIZ], **argp;
     char **arguments, *addrs[NADDRS];
 
-    if (nmh_init(argv[0], 1)) { return 1; }
+    if (nmh_init(argv[0], 2)) { return 1; }
 
-    mts_init (invo_name);
+    mts_init ();
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;
 
@@ -146,17 +146,16 @@ static int
 process (char *arg, int length)
 {
     int        status = 0;
-    register char *cp;
+    char *cp;
     char error[BUFSIZ];
-    register struct comp *cptr;
-    register struct pqpair *p, *q;
+    struct comp *cptr;
+    struct pqpair *p, *q;
     struct pqpair pq;
-    register struct mailname *mp;
+    struct mailname *mp;
 
     (q = &pq)->pq_next = NULL;
     while ((cp = getname (arg))) {
-       if ((p = (struct pqpair *) mh_xcalloc ((size_t) 1, sizeof(*p))) == NULL)
-           adios (NULL, "unable to allocate pqpair memory");
+       NEW0(p);
        if ((mp = getm (cp, NULL, 0, error, sizeof(error))) == NULL) {
            p->pq_text = getcpy (cp);
            p->pq_error = getcpy (error);