No error-checking for error-checking alloc functions
[mmh] / uip / rcvdist.c
index 4027ea2..53cc0f0 100644 (file)
@@ -156,10 +156,10 @@ static char *addrcomps[] = {
 static void
 rcvdistout(FILE *inb, char *form, char *addrs)
 {
-       register int char_read = 0, format_len, i, state;
-       register char *tmpbuf, **nxtbuf, **ap;
+       int char_read = 0, format_len, i, state;
+       char *tmpbuf, **nxtbuf, **ap;
        char *cp, *scanl, name[NAMESZ];
-       register struct comp *cptr, **savecomp;
+       struct comp *cptr, **savecomp;
        FILE *out;
 
        if (!(out = fopen(drft, "w"))) {
@@ -170,15 +170,11 @@ rcvdistout(FILE *inb, char *form, char *addrs)
        cp = new_fs(form ? form : rcvdistcomps, NULL);
        format_len = strlen(cp);
        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 = 0;