Print usage() when we are left with arguments
authorLaslo Hunhold <dev@frign.de>
Thu, 10 Aug 2017 20:23:55 +0000 (22:23 +0200)
committerAaron Marcher <me@drkhsh.at>
Thu, 10 Aug 2017 20:33:05 +0000 (22:33 +0200)
slstatus.c

index 4b6770b51130449c77fd3a2f53ec3801a906c8cd..052af871e1970f6bf7bf9fed332b5708b5698f73 100644 (file)
@@ -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);