]> diplodocus.org Git - nmh/blobdiff - uip/picksbr.c
ext_hook(): Flip if-statement condition so then-block simply returns.
[nmh] / uip / picksbr.c
index 3f8a17c25794df13c43311ce177812e0648eda7e..432bcf10d137b4e31a40bcec988c0712ed12c24f 100644 (file)
@@ -116,7 +116,7 @@ static unsigned char cc[] = {
 #define        pinform         if (!talked++) inform
 
 struct nexus {
-    int (*n_action)();
+    int (*n_action)(struct nexus *n, FILE *fp, int msgnum, long start, long stop);
 
     union {
        /* for {OR,AND,NOT}action */
@@ -180,7 +180,7 @@ static struct nexus *parse(void);
 static struct nexus *nexp1(void);
 static struct nexus *nexp2(void);
 static struct nexus *nexp3(void);
-static struct nexus *newnexus(int (*)(struct nexus *n,
+static struct nexus *newnexus(int (*action)(struct nexus *n,
     FILE *fp, int msgnum, long start, long stop));
 
 static int ORaction(struct nexus *n, FILE *fp, int msgnum,
@@ -519,8 +519,7 @@ PRaction (struct nexus *n, int level)
                dasctime (&n->n_tws, TW_NULL));
        return;
     }
-    fprintf (stderr, "UNKNOWN(0x%x)\n",
-            (unsigned int)(unsigned long) (*n->n_action));
+    fprintf(stderr, "UNKNOWN(%#llx)\n", (unsigned long long)n->n_action);
 }
 
 
@@ -794,7 +793,7 @@ advance (char *alp, char *aep)
                do {
                    lp--;
                    if (advance ((char *) lp, (char *) ep))
-                       return (1);
+                       return 1;
                } while (lp > curlp);
                return 0;
 
@@ -813,14 +812,14 @@ cclass (unsigned char *aset, int ac, int af)
 
     set = aset;
     if ((c = ac) == 0)
-       return (0);
+       return 0;
 
     n = *set++;
     while (n--)
        if (*set++ == c || set[-1] == cc[c])
-           return (af);
+           return af;
 
-    return (!af);
+    return !af;
 }
 
 
@@ -935,7 +934,7 @@ TWSaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop)
        switch (state = m_getfld2(&gstate, name, buf, &bufsz)) {
            case FLD: 
            case FLDPLUS: 
-                mh_xfree(bp);
+                free(bp);
                bp = mh_xstrdup(buf);
                while (state == FLDPLUS) {
                    bufsz = sizeof buf;
@@ -952,7 +951,7 @@ TWSaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop)
            case FMTERR: 
                if (state == LENERR || state == FMTERR)
                    inform("format error in message %d", msgnum);
-                mh_xfree(bp);
+                free(bp);
                return 0;
 
            default: 
@@ -969,6 +968,6 @@ TWSaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop)
        state = n->n_after ? (twsort (tw, &n->n_tws) > 0)
            : (twsort (tw, &n->n_tws) < 0);
 
-    mh_xfree(bp);
+    free(bp);
     return state;
 }