Browse Source

Print usage() when we are left with arguments

Laslo Hunhold 8 years ago
parent
commit
00ce7a746a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      slstatus.c

+ 4 - 0
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);