]> diplodocus.org Git - nmh/blobdiff - sbr/mf.c
Replace `if (p) free(p)' with `mh_xfree(p)'.
[nmh] / sbr / mf.c
index fa281766d8ada7a27eccae075259eabc3187a5ec..ebd130d2dfe30706112f407495a0c36f8127275e 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -34,17 +34,16 @@ isfrom(const char *string)
 int
 lequal (const char *a, const char *b)
 {
-    for (; *a; a++, b++)
+    char c1, c2;
+
+    for (; *a; a++, b++) {
        if (*b == 0)
            return FALSE;
-       else {
-           char c1 = islower ((unsigned char) *a) ?
-                                       toupper ((unsigned char) *a) : *a;
-           char c2 = islower ((unsigned char) *b) ?
-                                       toupper ((unsigned char) *b) : *b;
-           if (c1 != c2)
-               return FALSE;
-       }
+        c1 = toupper((unsigned char)*a);
+        c2 = toupper((unsigned char)*b);
+        if (c1 != c2)
+            return FALSE;
+    }
 
     return (*b == 0);
 }
@@ -181,18 +180,12 @@ getadrx (const char *addrs, int eai)
     char *bp;
     struct adrx *adrxp = &adrxs2;
 
-    if (pers)
-       free (pers);
-    if (mbox)
-       free (mbox);
-    if (host)
-       free (host);
-    if (path)
-       free (path);
-    if (grp)
-       free (grp);
-    if (note)
-       free (note);
+    mh_xfree(pers);
+    mh_xfree(mbox);
+    mh_xfree(host);
+    mh_xfree(path);
+    mh_xfree(grp);
+    mh_xfree(note);
     pers = mbox = host = path = grp = note = NULL;
     err[0] = 0;
 
@@ -298,10 +291,8 @@ again: ;
                return NOTOK;
            }
        case LX_COMA: 
-           if (note) {
-               free (note);
-               note = NULL;
-           }
+            mh_xfree(note);
+            note = NULL;
            goto again;
 
        case LX_END: