No error-checking for error-checking alloc functions
[mmh] / uip / repl.c
index 0ff86b8..f5df9ec 100644 (file)
@@ -388,12 +388,12 @@ static void
 replout(FILE *inb, char *drft, struct msgs *mp,
        int mime, char *form, char *filter)
 {
-       register int state, i;
-       register struct comp *cptr;
-       register char *tmpbuf;
-       register char **nxtbuf;
-       register char **ap;
-       register struct comp **savecomp;
+       int state, i;
+       struct comp *cptr;
+       char *tmpbuf;
+       char **nxtbuf;
+       char **ap;
+       struct comp **savecomp;
        int char_read = 0, format_len, mask;
        char name[NAMESZ], *scanl;
        unsigned char *cp;
@@ -412,12 +412,10 @@ replout(FILE *inb, char *drft, struct msgs *mp,
        /* compile format string */
        ncomps = fmt_compile(cp, &fmt) + 1;
 
-       if (!(nxtbuf = compbuffers = (char **)
-                       calloc((size_t) ncomps, sizeof(char *))))
-               adios(EX_OSERR, NULL, "unable to allocate component buffers");
-       if (!(savecomp = used_buf = (struct comp **)
-                       calloc((size_t) (ncomps+1), sizeof(struct comp *))))
-               adios(EX_OSERR, NULL, "unable to allocate component buffer stack");
+       nxtbuf = compbuffers = (char **)
+                       mh_xcalloc((size_t) ncomps, sizeof(char *));
+       savecomp = used_buf = (struct comp **)
+                       mh_xcalloc((size_t) (ncomps+1), sizeof(struct comp *));
        savecomp += ncomps + 1;
        *--savecomp = NULL;  /* point at zero'd end minus 1 */
 
@@ -527,7 +525,7 @@ finished:
        */
        FINDCOMP(cptr, "subject")
        if (cptr && (cp = cptr->c_text)) {
-               register char *sp = cp;
+               char *sp = cp;
 
                for (;;) {
                        while (isspace(*cp))
@@ -638,13 +636,13 @@ static unsigned int bufsiz=0;  /* current size of buf */
 char *
 formataddr(char *orig, char *str)
 {
-       register int len;
+       int len;
        char baddr[BUFSIZ], error[BUFSIZ];
-       register int isgroup;
-       register char *dst;
-       register char *cp;
-       register char *sp;
-       register struct mailname *mp = NULL;
+       int isgroup;
+       char *dst;
+       char *cp;
+       char *sp;
+       struct mailname *mp = NULL;
 
        /* if we don't have a buffer yet, get one */
        if (bufsiz == 0) {
@@ -710,7 +708,7 @@ static int
 insert(struct mailname *np)
 {
        char buffer[BUFSIZ];
-       register struct mailname *mp;
+       struct mailname *mp;
 
        if (np->m_mbox == NULL)
                return 0;