#include <signal.h>
#include <fcntl.h>
#include <h/mime.h>
+#include <h/utils.h>
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
* This buffer might need to be quite large, so we grow it as needed.
*/
- if ((field = (char *)malloc(field_size = 256)) == (char *)0)
- adios(NULL, "can't allocate field buffer.");
+ field = (char *)mh_xmalloc(field_size = 256);
/*
* Scan the draft file for a header field name that matches the -attach
}
if (++n >= field_size - 1) {
- if ((field = (char *)realloc((void *)field, field_size += 256)) == (char *)0)
- adios(NULL, "can't grow field buffer.");
+ field = (char *)mh_xrealloc((void *)field, field_size += 256);
p = field + n - 1;
}