(q = &pq)->pq_next = NULL;
while ((cp = getname(arg))) {
- if ((p = (struct pqpair *)
- mh_xcalloc((size_t) 1, sizeof(*p))) == NULL)
- adios(EX_OSERR, NULL, "unable to allocate pqpair memory");
+ p = (struct pqpair *) mh_xcalloc((size_t) 1, sizeof(*p));
if ((mp = getm(cp, NULL, 0, norm, error)) == NULL) {
p->pq_text = getcpy(cp);
p->pq_error = getcpy(error);
smsgs = (struct smsg *)
mh_xcalloc((size_t) (MAXFOLDER + 2), sizeof(*smsgs));
- if (smsgs == NULL)
- adios(EX_OSERR, NULL, "unable to allocate burst storage");
hi = mp->hghmsg + 1;
/*
** Allocate space for primary (outside) content
*/
- if ((ct = (CT) mh_xcalloc(1, sizeof(*ct))) == NULL) {
- adios(EX_OSERR, NULL, "out of memory");
- }
+ ct = (CT) mh_xcalloc(1, sizeof(*ct));
/*
** Allocate structure for handling decoded content
ct->c_subtype = MULTI_MIXED;
ct->c_file = getcpy(infile);
- if ((m = (struct multipart *) mh_xcalloc(1, sizeof(*m))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ m = (struct multipart *) mh_xcalloc(1, sizeof(*m));
ct->c_ctparams = (void *) m;
pp = &m->mp_parts;
if (!p)
continue;
- if ((part = (struct part *) mh_xcalloc(1, sizeof(*part))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ part = (struct part *) mh_xcalloc(1, sizeof(*part));
*pp = part;
pp = &part->mp_next;
part->mp_part = p;
{
CE ce;
- if ((ce = (CE) mh_xcalloc(1, sizeof(*ce))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ ce = (CE) mh_xcalloc(1, sizeof(*ce));
ct->c_cefile = ce;
ct->c_ceopenfnx = open7Bit; /* since unencoded */
}
/* allocate basic Content structure */
- if ((ct = (CT) mh_xcalloc(1, sizeof(*ct))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ ct = (CT) mh_xcalloc(1, sizeof(*ct));
*ctp = ct;
/* allocate basic structure for handling decoded content */
ct->c_type = CT_MULTIPART;
ct->c_subtype = MULTI_DIGEST;
- if ((m = (struct multipart *)
- mh_xcalloc(1, sizeof(*m))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ m = (struct multipart *) mh_xcalloc(1, sizeof(*m));
ct->c_ctparams = (void *) m;
pp = &m->mp_parts;
CT p;
CE pe;
- if ((p = (CT) mh_xcalloc(1, sizeof(*p)))
- == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ p = (CT) mh_xcalloc(1, sizeof(*p));
init_decoded_content(p);
pe = p->c_cefile;
if (get_ctinfo("message/rfc822", p, 0)
msgnum);
pe->ce_file = getcpy(buffer);
- if ((part = (struct part *) mh_xcalloc(1, sizeof(*part))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ part = (struct part *) mh_xcalloc(1, sizeof(*part));
*pp = part;
pp = &part->mp_next;
part->mp_part = p;
ct->c_type = CT_MULTIPART;
ct->c_subtype = vrsn;
- if ((m = (struct multipart *) mh_xcalloc(1, sizeof(*m))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ m = (struct multipart *) mh_xcalloc(1, sizeof(*m));
ct->c_ctparams = (void *) m;
pp = &m->mp_parts;
if (!p)
continue;
- if ((part = (struct part *)
- mh_xcalloc(1, sizeof(*part))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ part = (struct part *) mh_xcalloc(1, sizeof(*part));
*pp = part;
pp = &part->mp_next;
part->mp_part = p;
(q = &pq)->pq_next = NULL;
while ((cp = getname(ap))) {
- if ((p = (struct pqpair *)
- mh_xcalloc((size_t) 1, sizeof(*p))) == NULL)
- adios(EX_OSERR, NULL, "unable to allocate pqpair memory");
+ p = (struct pqpair *) mh_xcalloc((size_t) 1, sizeof(*p));
if ((mp = getm(cp, NULL, 0, AD_NAME, error)) == NULL) {
p->pq_text = getcpy(cp);
{
struct mcomp *c1;
- if ((c1 = (struct mcomp *) mh_xcalloc((size_t) 1, sizeof(*c1))) == NULL)
- adios(EX_OSERR, NULL, "unable to allocate comp memory");
+ c1 = (struct mcomp *) mh_xcalloc((size_t) 1, sizeof(*c1));
c1->c_flags = flags & ~INIT;
if ((c1->c_name = name ? getcpy(name) : NULL))
** check if message is coming from file
*/
if (file) {
- if (!(cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts));
ctp = cts;
if ((ct = parse_mime(file)))
}
seq_setprev(mp); /* set the previous-sequence */
- if (!(cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
- sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
+ sizeof(*cts));
ctp = cts;
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
HF hp;
/* allocate the content structure */
- if (!(ct = (CT) mh_xcalloc(1, sizeof(*ct))))
- adios(EX_OSERR, NULL, "out of memory");
+ ct = (CT) mh_xcalloc(1, sizeof(*ct));
ct->c_fp = in;
ct->c_file = getcpy(file);
ct->c_subtype = kv->kv_value;
/* allocate text character set structure */
- if ((t = (struct text *) mh_xcalloc(1, sizeof(*t))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ t = (struct text *) mh_xcalloc(1, sizeof(*t));
ct->c_ctparams = (void *) t;
/* scan for charset parameter */
}
/* allocate primary structure for multipart info */
- if ((m = (struct multipart *) mh_xcalloc(1, sizeof(*m))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ m = (struct multipart *) mh_xcalloc(1, sizeof(*m));
ct->c_ctparams = (void *) m;
/* check if boundary parameter contains only whitespace characters */
if (strcmp(buffer + 2, m->mp_start)!=0)
continue;
next_part:
- if ((part = (struct part *) mh_xcalloc(1, sizeof(*part)))
- == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ part = (struct part *) mh_xcalloc(1, sizeof(*part));
*next = part;
next = &part->mp_next;
i++;
/* allocate array of pointers to the parts */
- if (!(base = (struct part **) mh_xcalloc((size_t) (i + 1), sizeof(*base))))
- adios(EX_OSERR, NULL, "out of memory");
+ base = (struct part **) mh_xcalloc((size_t) (i + 1), sizeof(*base));
bmp = base;
/* point at all the parts */
char **ap, **ep;
struct partial *p;
- if ((p = (struct partial *) mh_xcalloc(1, sizeof(*p))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ p = (struct partial *) mh_xcalloc(1, sizeof(*p));
ct->c_ctparams = (void *) p;
/*
{
CE ce;
- if ((ce = (CE) mh_xcalloc(1, sizeof(*ce))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ ce = (CE) mh_xcalloc(1, sizeof(*ce));
ct->c_cefile = ce;
ct->c_ceopenfnx = openfnx;
** check if message is coming from file
*/
if (file) {
- if (!(cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts));
ctp = cts;
if ((ct = parse_mime(file)))
seq_setprev(mp); /* set the Previous-Sequence */
seq_setunseen(mp, 0); /* unset unseen seqs for shown msgs */
- if (!(cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
- sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
+ sizeof(*cts));
ctp = cts;
/*
** check if message is coming from file
*/
if (file) {
- if (!(cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts));
ctp = cts;
if ((ct = parse_mime(file)))
exit(EX_USAGE);
seq_setprev(mp); /* set the previous-sequence */
- if (!(cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
- sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
+ sizeof(*cts));
ctp = cts;
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
return NOTOK;
}
- if ((base = (CT *) mh_xcalloc((size_t) (i + 1), sizeof(*base))) == NULL)
- adios(EX_OSERR, NULL, "out of memory");
+ base = (CT *) mh_xcalloc((size_t) (i + 1), sizeof(*base));
ctq = base;
for (ctp = cts; *ctp; ctp++) {
** check if message is coming from file
*/
if (file) {
- if (!(cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts));
ctp = cts;
if ((ct = parse_mime(file)))
exit(EX_USAGE);
seq_setprev(mp); /* set the previous-sequence */
- if (!(cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
- sizeof(*cts))))
- adios(EX_OSERR, NULL, "out of memory");
+ cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
+ sizeof(*cts));
ctp = cts;
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
{
struct nexus *p;
- if ((p = (struct nexus *) mh_xcalloc((size_t) 1, sizeof *p)) == NULL)
- adios(EX_OSERR, NULL, "unable to allocate component storage");
+ p = (struct nexus *) mh_xcalloc((size_t) 1, sizeof *p);
p->n_action = action;
return p;
cp = new_fs(form ? form : rcvdistcomps, NULL);
format_len = strlen(cp);
ncomps = fmt_compile(cp, &fmt) + 1;
- if (!(nxtbuf = compbuffers =
- (char **) mh_xcalloc((size_t) ncomps, sizeof(char *)))) {
- adios(EX_OSERR, NULL, "unable to allocate component buffers");
- }
- if (!(savecomp = used_buf =
+ nxtbuf = compbuffers =
+ (char **) mh_xcalloc((size_t) ncomps, sizeof(char *));
+ savecomp = used_buf =
(struct comp **) mh_xcalloc((size_t) (ncomps + 1),
- sizeof(struct comp *)))) {
- adios(EX_OSERR, NULL, "unable to allocate component buffer stack");
- }
+ sizeof(struct comp *));
savecomp += ncomps + 1;
*--savecomp = 0;
/* compile format string */
ncomps = fmt_compile(cp, &fmt) + 1;
- if (!(nxtbuf = compbuffers = (char **)
- mh_xcalloc((size_t) ncomps, sizeof(char *))))
- adios(EX_OSERR, NULL, "unable to allocate component buffers");
- if (!(savecomp = used_buf = (struct comp **)
- mh_xcalloc((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 = NULL; /* point at zero'd end minus 1 */
nxtbuf = compbuffers = (char **) mh_xcalloc((size_t) ncomps,
sizeof(char *));
- if (!nxtbuf)
- adios(EX_OSERR, NULL, "unable to allocate component buffers");
used_buf = (struct comp **) mh_xcalloc((size_t) (ncomps+1),
sizeof(struct comp *));
- if (!used_buf)
- adios(EX_OSERR, NULL, "unable to allocate component buffer stack");
/* NULL-terminate array */
used_buf += ncomps;
*used_buf = NULL;
smsgs = (struct smsg *) mh_xcalloc((size_t) (mp->hghsel - mp->lowsel + 2),
sizeof(*smsgs));
- if (smsgs == NULL)
- adios(EX_OSERR, NULL, "unable to allocate sort storage");
s = smsgs;
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {