X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/275cd091960ac836c4ccb3b7e07ceeda6df7ddd7..60d6f8e0407f578bef9f3392afa1283f97152c60:/uip/fmttest.c diff --git a/uip/fmttest.c b/uip/fmttest.c index 712d7df2..d6026b95 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -351,7 +351,7 @@ main (int argc, char **argv) if (trace) { struct trace_context *ctx; - ctx = mh_xmalloc(sizeof(*ctx)); + NEW(ctx); ctx->num = -1; ctx->str = dummy; ctx->outbuf = getcpy(NULL); @@ -420,8 +420,7 @@ process_addresses(struct format *fmt, struct msgs_array *addrs, for (i = 0; i < addrs->size; i++) { (q = &pq)->pq_next = NULL; while ((cp = getname(addrs->msgs[i]))) { - if ((p = (struct pqpair *) mh_xcalloc ((size_t) 1, sizeof(*p))) == NULL) - adios (NULL, "unable to allocate pqpair memory"); + NEW0(p); if ((mp = getm(cp, NULL, 0, error, sizeof(error))) == NULL) { p->pq_text = getcpy(cp); p->pq_error = getcpy(error);