X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhl.c;h=20f5d31f8bb5998e1655855ed57bcd78f3e58d2f;hp=5caa717c4db6fb36b44b486e4d08c97a1e3a582d;hb=a87df3543d3bc128ba4079d1f95638476ba5ca50;hpb=1e99819ed105950cd584c71fa4b2e36b038be102 diff --git a/uip/mhl.c b/uip/mhl.c index 5caa717..20f5d31 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -599,7 +599,7 @@ static void mhlfile(FILE *fp, char *mname, int ofilen, int ofilec) { enum state state; - struct field f = {{0}}; + struct field f = free_field; struct mcomp *c1, *c2, *c3; char **ip; @@ -699,7 +699,7 @@ mhlfile(FILE *fp, char *mname, int ofilen, int ofilec) case LENERR2: case FMTERR2: - case ERR2: + case IOERR2: advise(NULL, "format error in message %s", mname); exitstat++; return; @@ -784,9 +784,7 @@ mcomp_format(struct mcomp *c1, struct mcomp *c2) (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); @@ -833,8 +831,7 @@ add_queue(struct mcomp **head, struct mcomp **tail, char *name, { 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))