ntpd: default to FEATURE_NTP_AUTH=y
[oweals/busybox.git] / mailutils / popmaildir.c
index 1695a9bb8d3d7f1d48c7ac866ff400cadbb48036..589456715420d372f837c203491f51b68ce8c9d6 100644 (file)
@@ -45,8 +45,8 @@
 //usage:     "\n       -k              Keep retrieved messages on the server"
 //usage:     "\n       -t SEC          Network timeout"
 //usage:       IF_FEATURE_POPMAILDIR_DELIVERY(
-//usage:     "\n       -F \"PROG ARGS\"        Filter program (may be repeated)"
-//usage:     "\n       -M \"PROG ARGS\"        Delivery program"
+//usage:     "\n       -F 'PROG ARGS'  Filter program (may be repeated)"
+//usage:     "\n       -M 'PROG ARGS'  Delivery program"
 //usage:       )
 //usage:     "\n"
 //usage:     "\nFetch from plain POP3 server:"
@@ -125,9 +125,9 @@ int popmaildir_main(int argc UNUSED_PARAM, char **argv)
        INIT_G();
 
        // parse options
-       opt_complementary = "-1:dd";
-       opts = getopt32(argv,
-               "bdmVcasTkt:+" "R:+Z:L:+H:+" IF_FEATURE_POPMAILDIR_DELIVERY("M:F:"),
+       opts = getopt32(argv, "^"
+               "bdmVcasTkt:+" "R:+Z:L:+H:+" IF_FEATURE_POPMAILDIR_DELIVERY("M:F:")
+               "\0" "-1:dd",
                &timeout, NULL, NULL, NULL, &opt_nlines
                IF_FEATURE_POPMAILDIR_DELIVERY(, &delivery, &delivery) // we treat -M and -F the same
        );
@@ -265,7 +265,7 @@ int popmaildir_main(int argc UNUSED_PARAM, char **argv)
 
                // atomically move message to ./new/
                target = xstrdup(filename);
-               strncpy(target, "new", 3);
+               memcpy(target, "new", 3);
                // ... or just stop receiving on failure
                if (rename_or_warn(filename, target))
                        break;