]> diplodocus.org Git - nmh/blobdiff - uip/scan.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / scan.c
index 1d627e86543c254a7352d0c02b40ee070dc93394..b0c64f1ca0393aab28bde471f7482bd991d805a3 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * scan.c -- display a one-line "scan" listing of folder or messages
+/* scan.c -- display a one-line "scan" listing of folder or messages
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -12,6 +11,8 @@
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
+#include "sbr/m_maildir.h"
+#include "sbr/terminal.h"
 
 #define SCAN_SWITCHES \
     X("clear", 0, CLRSW) \
 
 #define SCAN_SWITCHES \
     X("clear", 0, CLRSW) \
@@ -126,10 +127,9 @@ main (int argc, char **argv)
        if (*cp == '+' || *cp == '@') {
            if (folder)
                adios (NULL, "only one folder at a time!");
        if (*cp == '+' || *cp == '@') {
            if (folder)
                adios (NULL, "only one folder at a time!");
-           else
-               folder = pluspath (cp);
+            folder = pluspath (cp);
        } else
        } else
-               app_msgarg(&msgs, cp);
+            app_msgarg(&msgs, cp);
     }
 
     if (!context_find ("path"))
     }
 
     if (!context_find ("path"))
@@ -221,7 +221,7 @@ main (int argc, char **argv)
            ivector_push_back (seqnum, seq_getnum (mp, *ap));
 
        num_unseen_seq = i;
            ivector_push_back (seqnum, seq_getnum (mp, *ap));
 
        num_unseen_seq = i;
-        mh_xfree(dp);
+        free(dp);
     }
 
     ontty = isatty (fileno (stdout));
     }
 
     ontty = isatty (fileno (stdout));