]> diplodocus.org Git - nmh/blobdiff - uip/rcvstore.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / rcvstore.c
index f3ee787f185b01daebebeabbba9d8e4bc24299a8..6f82f812520b960c4b47db3514d90199504de2c7 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * rcvstore.c -- asynchronously add mail to a folder
+/* rcvstore.c -- asynchronously add mail to a folder
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -11,6 +9,10 @@
 #include <fcntl.h>
 #include <h/signals.h>
 #include <h/mts.h>
+#include <h/utils.h>
+#include "sbr/m_maildir.h"
+#include "sbr/m_mktemp.h"
+#include "sbr/makedir.h"
 
 #define RCVSTORE_SWITCHES \
     X("create", 0, CRETSW) \
@@ -121,8 +123,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 {
            adios (NULL, "usage: %s [+folder] [switches]", invo_name);
        }
@@ -222,7 +223,7 @@ main (int argc, char **argv)
 /*
  * Clean up and exit
  */
-static void
+static void NORETURN
 unlink_done(int status)
 {
     if (tmpfilenam && *tmpfilenam)