]> diplodocus.org Git - nmh/blobdiff - uip/mhcachesbr.c
Fixed use of WIFEXITED in mhfixmsg.c.
[nmh] / uip / mhcachesbr.c
index 94c4bb34adefd97119e7a52f2d9d9b3c5ade39ff..7fa27ab39f9f30c5af145227782037e51de567c9 100644 (file)
@@ -96,7 +96,7 @@ cache_content (CT ct)
 {
     int        cachetype;
     char *file, cachefile[BUFSIZ];
-    CE ce = ct->c_cefile;
+    CE ce = &ct->c_cefile;
 
     if (!ct->c_id) {
        advise (NULL, "no %s: field in %s", ID_FIELD, ct->c_file);
@@ -376,18 +376,17 @@ find_cache_aux2 (char *mapfile, char *id, char *mapname, int namelen)
     int        state;
     char buf[BUFSIZ], name[NAMESZ];
     FILE *fp;
-    m_getfld_state_t gstate;
+    m_getfld_state_t gstate = 0;
 
     if (!(fp = lkfopen (mapfile, "r")))
        return NOTOK;
 
-    m_getfld_state_init (&gstate);
     for (;;) {
        int result;
        char *cp, *dp;
        int bufsz = sizeof buf;
 
-       switch (state = m_getfld (gstate, name, buf, &bufsz, fp)) {
+       switch (state = m_getfld (&gstate, name, buf, &bufsz, fp)) {
            case FLD:
            case FLDPLUS:
                strncpy (mapname, name, namelen);
@@ -397,7 +396,7 @@ find_cache_aux2 (char *mapfile, char *id, char *mapname, int namelen)
                    cp = add (buf, NULL);
                    while (state == FLDPLUS) {
                        bufsz = sizeof buf;
-                       state = m_getfld (gstate, name, buf, &bufsz, fp);
+                       state = m_getfld (&gstate, name, buf, &bufsz, fp);
                        cp = add (buf, cp);
                    }
                }