]> diplodocus.org Git - nmh/blobdiff - uip/mhparse.c
Simplify folder_exists() to just testing stat(2)'s return value.
[nmh] / uip / mhparse.c
index ecb0b72f0019d114ef659704bdac05c4166d6674..7e01b050807fe93b0538b73ca42c23c9cb367e3e 100644 (file)
@@ -657,10 +657,7 @@ get_ctinfo (char *cp, CT ct, int magic)
                TYPE_FIELD, ct->c_file);
        return NOTOK;
     }
                TYPE_FIELD, ct->c_file);
        return NOTOK;
     }
-
-    /* down case the content type string */
-    for (dp = ci->ci_type; *dp; dp++)
-        *dp = tolower ((unsigned char) *dp);
+    ToLower(ci->ci_type);
 
     while (isspace ((unsigned char) *cp))
        cp++;
 
     while (isspace ((unsigned char) *cp))
        cp++;
@@ -695,10 +692,7 @@ get_ctinfo (char *cp, CT ct, int magic)
                TYPE_FIELD, ct->c_file, ci->ci_type);
        return NOTOK;
     }
                TYPE_FIELD, ct->c_file, ci->ci_type);
        return NOTOK;
     }
-
-    /* down case the content subtype string */
-    for (dp = ci->ci_subtype; *dp; dp++)
-        *dp = tolower ((unsigned char) *dp);
+    ToLower(ci->ci_subtype);
 
 magic_skip:
     while (isspace ((unsigned char) *cp))
 
 magic_skip:
     while (isspace ((unsigned char) *cp))
@@ -1226,7 +1220,7 @@ end_part:
                continue;
            *next = NULL;
            free_content (p);
                continue;
            *next = NULL;
            free_content (p);
-           free ((char *) part);
+           free(part);
        }
     }
 
        }
     }
 
@@ -1838,7 +1832,7 @@ openBase64 (CT ct, char **file)
         for (i = 0; i < decoded_len; ++i) {
             putc (*decoded_p++, ce->ce_fp);
         }
         for (i = 0; i < decoded_len; ++i) {
             putc (*decoded_p++, ce->ce_fp);
         }
-        free ((char *) decoded);
+        free(decoded);
         if (ferror (ce->ce_fp)) {
             content_error (ce->ce_file, ct, "error writing to");
             goto clean_up;
         if (ferror (ce->ce_fp)) {
             content_error (ce->ce_file, ct, "error writing to");
             goto clean_up;