aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-09-29 13:40:15 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2016-09-29 13:40:15 +0200
commit43de836b919db7f5c10f63a4a788acbc2752e74f (patch)
tree691711f4cef98da9d4a80b0cfa7615677f94fd0f
parent16d10f574bca429b872b8c2f055a127a9fc9a1ba (diff)
downloadxK-43de836b919db7f5c10f63a4a788acbc2752e74f.tar.gz
xK-43de836b919db7f5c10f63a4a788acbc2752e74f.tar.xz
xK-43de836b919db7f5c10f63a4a788acbc2752e74f.zip
degesch: exit with error when arguments are given
-rw-r--r--degesch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index a06ef24..58fd303 100644
--- a/degesch.c
+++ b/degesch.c
@@ -13452,6 +13452,11 @@ main (int argc, char *argv[])
opt_handler_usage (&oh, stderr);
exit (EXIT_FAILURE);
}
+ if (optind != argc)
+ {
+ opt_handler_usage (&oh, stderr);
+ exit (EXIT_FAILURE);
+ }
opt_handler_free (&oh);
// We only need to convert to and from the terminal encoding