summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2017-08-10 22:23:55 +0200
committerAaron Marcher <me@drkhsh.at>2017-08-10 22:33:05 +0200
commit00ce7a746ab0630e7d3b84288307435c6d62610a (patch)
tree0ae323ab3c2ac6e110ba7014002c1e296d2f1f33
parentc9d47405f4ab3cf99d7d2116fbb7622c02a27e5e (diff)
Print usage() when we are left with arguments
-rw-r--r--slstatus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/slstatus.c b/slstatus.c
index 4b6770b..052af87 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -861,6 +861,10 @@ main(int argc, char *argv[])
usage();
} ARGEND
+ if (argc) {
+ usage();
+ }
+
memset(&act, 0, sizeof(act));
act.sa_handler = sighandler;
sigaction(SIGINT, &act, 0);