From: Laslo Hunhold Date: Thu, 10 Aug 2017 20:23:55 +0000 (+0200) Subject: Print usage() when we are left with arguments X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=00ce7a746ab0630e7d3b84288307435c6d62610a;p=suckless%2Fslstatus.git Print usage() when we are left with arguments --- 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);