Replace mh_xmalloc() with mh_xcalloc()
[mmh] / sbr / m_getfld.c
index 3539ed4..6931b2e 100644 (file)
@@ -187,8 +187,6 @@ m_getfld(int state, unsigned char *name, unsigned char *buf,
        }
 
        switch (state) {
-       case FLDEOF:
-       case BODYEOF:
        case FLD:
                if (c == '\n' || c == '-') {
                        /* we hit the header/body separator */
@@ -611,7 +609,7 @@ thisisanmbox(FILE *iob)
                continue;
        }
        c = strlen(delimstr);
-       fdelim = (unsigned char *) mh_xmalloc((size_t) (c + 3));
+       fdelim = (unsigned char *) mh_xcalloc((size_t) (c + 3), sizeof(char));
        *fdelim++ = '\0';
        *fdelim = '\n';
        msg_delim = (char *)fdelim+1;