- switch (state = m_getfld(state, name, field, sizeof(field), ib)) {
- case FLD:
- case FLDPLUS:
- case FLDEOF:
- np = (struct node *) mh_xmalloc(sizeof(*np));
- *npp = np;
- *(npp = &np->n_next) = NULL;
- np->n_name = getcpy(name);
- if (state == FLDPLUS) {
- cp = getcpy(field);
- while (state == FLDPLUS) {
- state = m_getfld(state, name, field, sizeof(field), ib);
- cp = add(field, cp);
- }
- np->n_field = trimcpy(cp);
- free(cp);
- } else {
- np->n_field = trimcpy(field);
+ switch (state = m_getfld(state, name, field, sizeof(field),
+ ib)) {
+ case FLD:
+ case FLDPLUS:
+ case FLDEOF:
+ np = (struct node *) mh_xmalloc(sizeof(*np));
+ *npp = np;
+ *(npp = &np->n_next) = NULL;
+ np->n_name = getcpy(name);
+ if (state == FLDPLUS) {
+ cp = getcpy(field);
+ while (state == FLDPLUS) {
+ state = m_getfld(state, name, field,
+ sizeof(field), ib);
+ cp = add(field, cp);