X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fsortm.c;h=06ec0cac5a9c5e2149ec74d68a65d757005de954;hp=5d15ed68d40099dec990e1cf9dc9b97994646aa4;hb=10eff860a28b96582526eb739fd0a55441669938;hpb=d6742b1bb19c7eca8488402484a6e4f55543d789 diff --git a/uip/sortm.c b/uip/sortm.c index 5d15ed6..06ec0ca 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -224,8 +224,7 @@ main(int argc, char **argv) struct smsg **slist, **flist; struct smsg ***il, **fp, **dp; - slist = (struct smsg **) - mh_xmalloc((nmsgs+1) * sizeof(*slist)); + slist = (struct smsg **) mh_xcalloc(nmsgs+1, sizeof(*slist)); memcpy((char *)slist, (char *)dlist, (nmsgs+1)*sizeof(*slist)); qsort((char *)slist, nmsgs, sizeof(*slist), (qsort_comp) subsort); @@ -244,8 +243,7 @@ main(int argc, char **argv) ** make up the final list, chronological but with ** all the same subjects grouped together. */ - flist = (struct smsg **) - mh_xmalloc((nmsgs+1) * sizeof(*flist)); + flist = (struct smsg **) mh_xcalloc(nmsgs+1, sizeof(*flist)); fp = flist; for (dp = dlist; *dp;) { struct smsg **s = il[(*dp++)->s_msg];