X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/adc0a3232c43033729dbc036f0757bddfba463bd..47bf6339eb158ba9884befc0c8dab46acb1c0100:/uip/mhparse.c diff --git a/uip/mhparse.c b/uip/mhparse.c index bf93b18e..39a701db 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -262,7 +262,7 @@ get_content (FILE *in, char *file, int toplevel) char *np, *vp; CT ct; HF hp; - m_getfld_state_t gstate; + m_getfld_state_t gstate = 0; /* allocate the content structure */ if (!(ct = (CT) calloc (1, sizeof(*ct)))) @@ -276,10 +276,9 @@ get_content (FILE *in, char *file, int toplevel) * Parse the header fields for this * content into a linked list. */ - m_getfld_state_init (&gstate); for (compnum = 1;;) { int bufsz = sizeof buf; - switch (state = m_getfld (gstate, name, buf, &bufsz, in)) { + switch (state = m_getfld (&gstate, name, buf, &bufsz, in)) { case FLD: case FLDPLUS: compnum++; @@ -291,7 +290,7 @@ get_content (FILE *in, char *file, int toplevel) /* if necessary, get rest of field */ while (state == FLDPLUS) { bufsz = sizeof buf; - state = m_getfld (gstate, name, buf, &bufsz, in); + state = m_getfld (&gstate, name, buf, &bufsz, in); vp = add (buf, vp); /* add to previous value */ }