X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/adc0a3232c43033729dbc036f0757bddfba463bd..df6e7ebd567b8c815843682a2739009bac298b33:/sbr/readconfig.c diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 4e02738c..b25ea99a 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -52,17 +52,16 @@ readconfig (struct node **npp, FILE *ib, char *file, int ctx) char name[NAMESZ], field[BUFSIZ]; register struct node *np; register struct procstr *ps; - m_getfld_state_t gstate; + m_getfld_state_t gstate = 0; if (npp == NULL && (npp = opp) == NULL) { admonish (NULL, "bug: readconfig called but pump not primed"); return; } - m_getfld_state_init (&gstate); for (;;) { int fieldsz = sizeof field; - switch (state = m_getfld (gstate, name, field, &fieldsz, ib)) { + switch (state = m_getfld (&gstate, name, field, &fieldsz, ib)) { case FLD: case FLDPLUS: np = (struct node *) mh_xmalloc (sizeof(*np)); @@ -73,7 +72,7 @@ readconfig (struct node **npp, FILE *ib, char *file, int ctx) cp = getcpy (field); while (state == FLDPLUS) { fieldsz = sizeof field; - state = m_getfld (gstate, name, field, &fieldsz, ib); + state = m_getfld (&gstate, name, field, &fieldsz, ib); cp = add (field, cp); } np->n_field = trimcpy (cp);