]> sigrok.org Git - sigrok-cli.git/commitdiff
options: Make sure there are no extra arguments.
authorJens Steinhauser <redacted>
Tue, 15 Jul 2014 21:40:20 +0000 (23:40 +0200)
committerJens Steinhauser <redacted>
Tue, 15 Jul 2014 21:40:20 +0000 (23:40 +0200)
options.c

index 03c001cd2df25d486d6f69f5690dfdc73ab5688a..c8b51ec1e353c2dfb2be035886ad6a58199adc60 100644 (file)
--- 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: