From 00ce7a746ab0630e7d3b84288307435c6d62610a Mon Sep 17 00:00:00 2001 From: Laslo Hunhold Date: Thu, 10 Aug 2017 22:23:55 +0200 Subject: Print usage() when we are left with arguments --- slstatus.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3