Replace mh_xmalloc() with mh_xcalloc()
[mmh] / uip / anno.c
index 1c97179..96b896c 100644 (file)
@@ -305,7 +305,7 @@ annolist(char *file, unsigned char *comp, int number)
        }
 
        /* We'll grow this buffer as needed. */
-       field = (char *)mh_xmalloc(field_size = 256);
+       field = (char *)mh_xcalloc(field_size = 256, sizeof(char));
 
        make_comp(&comp);
        length = strlen(comp); /* Convenience copy. */
@@ -459,7 +459,7 @@ dodel(int fd, unsigned char *comp, char *text, FILE *tmp, int number)
        if ((fp = fdopen(fd, "r")) == NULL) {
                adios(EX_IOERR, NULL, "unable to fdopen file.");
        }
-       field = (char *)mh_xmalloc(field_size);
+       field = (char *)mh_xcalloc(field_size, sizeof(char));
 
        /*
        **  Copy lines from the input file to the temporary file