Add missing : to getopt string for -p which takes a parameter.
authorStuart Henderson <sthen@openbsd.org>
Thu, 30 Aug 2012 13:15:05 +0000 (14:15 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 31 Aug 2012 12:19:47 +0000 (13:19 +0100)
Print an error rather than trying to strdup(NULL) if the parameter
is not specified.

Signed-off-by: Stuart Henderson <sthen@openbsd.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
main.c

diff --git a/main.c b/main.c
index 25f184b..a93e10a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -338,7 +338,7 @@ static int next_option(int argc, char **argv, char **config_arg)
  next:
        if (!config_file) {
                opt = getopt_long(argc, argv,
-                                 "bC:c:e:Ddg:hi:k:lpP:Q:qSs:U:u:Vvx:",
+                                 "bC:c:e:Ddg:hi:k:lp:P:Q:qSs:U:u:Vvx:",
                                  long_options, NULL);
 
                *config_arg = optarg;