]> diplodocus.org Git - nmh/blobdiff - uip/mhpath.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / mhpath.c
index 9ab94392771d40667a8ecf6b3ca11e21c4048c65..abf6b01f28247bdc0c3b5f9a994d9368bc1fdb1b 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * mhpath.c -- print full pathnames of nmh messages and folders
+/* mhpath.c -- print full pathnames of nmh messages and folders
  *
  * 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 +7,7 @@
 
 #include <h/mh.h>
 #include <h/utils.h>
+#include "sbr/m_maildir.h"
 
 #define MHPATH_SWITCHES \
     X("version", 0, VERSIONSW) \
@@ -62,8 +61,7 @@ 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
                app_msgarg(&msgs, cp);
     }
@@ -77,7 +75,7 @@ main(int argc, char **argv)
 
     /* If no messages are given, print folder pathname */
     if (!msgs.size) {
-       printf ("%s\n", maildir);
+       puts(maildir);
        done (0);
     }