]> diplodocus.org Git - nmh/blobdiff - uip/comp.c
annosbr.c: free(3) takes void pointer; don't cast non-const pointer.
[nmh] / uip / comp.c
index 2bd5ef700db6566a3fdc26d2c4e884b948cbde8e..2805d56b6f759637cc7689d10d11ec7cf4fa25c8 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * comp.c -- compose a message
+/* comp.c -- compose a message
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -9,6 +8,8 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/fmt_scan.h>
+#include "h/done.h"
+#include "sbr/m_maildir.h"
 #include <fcntl.h>
 
 #define COMP_SWITCHES \
@@ -191,7 +192,7 @@ main (int argc, char **argv)
                    if (*cp == '@')
                        cp = dp = path(cp + 1, TSUBCWF);
                    fcc = addlist(fcc, cp);
-                    mh_xfree(dp);
+                    free(dp);
                    continue;
 
                case WIDTHSW:
@@ -211,13 +212,11 @@ main (int argc, char **argv)
        if (*cp == '+' || *cp == '@') {
            if (folder)
                adios (NULL, "only one folder at a time!");
-           else
-               folder = pluspath (cp);
+            folder = pluspath (cp);
        } else {
            if (msg)
                adios (NULL, "only one message at a time!");
-           else
-               msg = cp;
+            msg = cp;
        }
     }
 
@@ -396,7 +395,7 @@ edit_it:
 
     if (nwhat)
        done (0);
-    what_now (ed, nedit, use, drft, NULL, 0, NULLMP, NULL, 0, cwd, 0);
+    what_now (ed, nedit, use, drft, NULL, 0, NULL, NULL, 0, cwd, 0);
     done (1);
     return 1;
 }