From c287f304df87b814399f9844794422ef72857673 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 2 Oct 2013 20:46:06 -0700 Subject: [PATCH] monitor: Fail on invalid command line parameters --- monitor/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monitor/main.c b/monitor/main.c index 0a2e8aae2..e72b240ab 100644 --- a/monitor/main.c +++ b/monitor/main.c @@ -137,6 +137,11 @@ int main(int argc, char *argv[]) } } + if (argc - optind > 0) { + fprintf(stderr, "Invalid command line parameters\n"); + return EXIT_FAILURE; + } + sigemptyset(&mask); sigaddset(&mask, SIGINT); sigaddset(&mask, SIGTERM); -- 2.11.0