Replace mh_xmalloc() with mh_xcalloc()
[mmh] / sbr / vfgets.c
index 3e71ad0..1718ff1 100644 (file)
@@ -22,7 +22,7 @@ vfgets(FILE *in, char **bp)
        static char *pp = NULL;
 
        if (pp == NULL)
-               pp = mh_xmalloc((size_t) (len = BUFSIZ));
+               pp = mh_xcalloc((size_t) (len = BUFSIZ), sizeof(char));
 
        for (ep = (cp = pp) + len - 1;;) {
                if (fgets(cp, ep - cp + 1, in) == NULL) {