X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d6b2ae5fa68b9a82ffc006c233aef64c5cdb3bd2..6eb1f7c57d8343e61a1130491d08fd821746adc9:/uip/sortm.c?ds=sidebyside diff --git a/uip/sortm.c b/uip/sortm.c index 0b8e1853..ff3f3519 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -253,9 +253,7 @@ main (int argc, char **argv) * the collection of messages with the same subj * given a message number. */ - il = (struct smsg ***) mh_xcalloc (mp->hghsel+1, sizeof(*il)); - if (! il) - adios (NULL, "couldn't allocate msg list"); + il = mh_xcalloc(mp->hghsel + 1, sizeof *il); for (i = 0; i < nmsgs; i++) il[slist[i]->s_msg] = &slist[i]; /* @@ -317,12 +315,7 @@ read_hdrs (struct msgs *mp, char *datesw) twscopy (&tb, dlocaltimenow ()); - smsgs = (struct smsg *) - mh_xcalloc ((size_t) (mp->hghsel - mp->lowsel + 2), - sizeof(*smsgs)); - if (smsgs == NULL) - adios (NULL, "unable to allocate sort storage"); - + smsgs = mh_xcalloc(mp->hghsel - mp->lowsel + 2, sizeof *smsgs); s = smsgs; for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { if (is_selected(mp, msgnum)) {