]> diplodocus.org Git - nmh/blobdiff - uip/mhfree.c
Try using -man instead of -mandoc in test-manpages on OpenBSD
[nmh] / uip / mhfree.c
index cf9e548e1fc0ed19bcca2be6a3cb5ff98bf90635..5fa2a59cfa3bc1ff3059aede1c28d8748e21a0f1 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include <h/mh.h>
  */
 
 #include <h/mh.h>
-#include <errno.h>
 #include <h/mime.h>
 #include <h/mhparse.h>
 
 #include <h/mime.h>
 #include <h/mhparse.h>
 
@@ -262,10 +261,7 @@ free_external (CT ct)
 void
 free_encoding (CT ct, int toplevel)
 {
 void
 free_encoding (CT ct, int toplevel)
 {
-    CE ce;
-
-    if (!(ce = ct->c_cefile))
-       return;
+    CE ce = &ct->c_cefile;
 
     if (ce->ce_fp) {
        fclose (ce->ce_fp);
 
     if (ce->ce_fp) {
        fclose (ce->ce_fp);
@@ -279,10 +275,7 @@ free_encoding (CT ct, int toplevel)
        ce->ce_file = NULL;
     }
 
        ce->ce_file = NULL;
     }
 
-    if (toplevel) {
-       free ((char *) ce);
-       ct->c_cefile = NULL;
-    } else {
+    if (! toplevel) {
        ct->c_ceopenfnx = NULL;
     }
 }
        ct->c_ceopenfnx = NULL;
     }
 }