]> diplodocus.org Git - nmh/blobdiff - uip/sortm.c
Alter mh-chart(7)'s NAME to be lowercase.
[nmh] / uip / sortm.c
index 9351ec036cdc9fa47652e42d4ef39de1500ceedd..97d42e5fecec37166a2954c2afeba92a4ca43adb 100644 (file)
@@ -394,10 +394,8 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
                      msg, compnum);
                check_failed = 1;
            }
-           if (datecomp)
-               free (datecomp);
-           if (subjcomp)
-               free (subjcomp);
+            mh_xfree(datecomp);
+            mh_xfree(subjcomp);
            fclose (in);
            return (0);
 
@@ -451,8 +449,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
 
            while ((c = *cp++)) {
                if (isascii((unsigned char) c) && isalnum((unsigned char) c))
-                   *cp2++ = isupper((unsigned char) c) ?
-                                       tolower((unsigned char) c) : c;
+                   *cp2++ = tolower((unsigned char)c);
            }
 
            *cp2 = '\0';
@@ -463,8 +460,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
        smsg->s_subj = subjcomp;
     }
     fclose (in);
-    if (datecomp)
-       free (datecomp);
+    mh_xfree(datecomp);
 
     return (1);
 }