dss.c: Fix check for number of non-options.
authorAndre Noll <maan@systemlinux.org>
Sun, 16 Mar 2008 16:05:01 +0000 (17:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 16 Mar 2008 16:05:01 +0000 (17:05 +0100)
With group options, it's a syntax error to specify any non-options.

dss.c

diff --git a/dss.c b/dss.c
index f33ce8d..121cee4 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -691,9 +691,9 @@ int main(int argc, char **argv)
        int ret;
 
        cmdline_parser(argc, argv, &conf); /* aborts on errors */
-       if (!conf.inputs_num) {
+       if (conf.inputs_num) {
                ret = -E_SYNTAX;
-               make_err_msg("no command given");
+               make_err_msg("additional non-options given");
                goto out;
        }
        ret = read_config_file();