From: Jens Steinhauser Date: Tue, 15 Jul 2014 21:40:20 +0000 (+0200) Subject: options: Make sure there are no extra arguments. X-Git-Tag: sigrok-cli-0.6.0~91 X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=commitdiff_plain;h=41ce2cbb8ff6253bc1a223298ad93f75dfabcceb;hp=44ac76145c74a503916ffc9a29701b3226d8c0c6 options: Make sure there are no extra arguments. --- diff --git a/options.c b/options.c index 03c001c..c8b51ec 100644 --- a/options.c +++ b/options.c @@ -181,6 +181,11 @@ int parse_options(int argc, char **argv) opt_output_file = g_strdup(output_file_array[0]); } + if (1 != argc) { + g_critical("superfluous command line argument \"%s\"", argv[1]); + goto done; + } + ret = 0; done: