X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2e9c6b8b2c97bafa9416690d562a9425c5bd238f..fc31cece:/uip/mhstoresbr.c?ds=sidebyside diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 62a5ba43..9869914b 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -42,8 +42,9 @@ struct mhstoreinfo { mhstoreinfo_t mhstoreinfo_create (CT *ct, char *pwd, const char *csw, int asw, int vsw) { - mhstoreinfo_t info = mh_xmalloc (sizeof *info); + mhstoreinfo_t info; + NEW(info); info->cts = ct; info->cwd = pwd; info->autosw = asw; @@ -344,9 +345,7 @@ store_partial (CT ct, mhstoreinfo_t info) return NOTOK; } - if ((base = (CT *) mh_xcalloc ((size_t) (i + 1), sizeof(*base))) == NULL) - adios (NULL, "out of memory"); - + base = mh_xcalloc(i + 1, sizeof *base); ctq = base; for (ctp = info->cts; *ctp; ctp++) { p = *ctp;