diff options
author | Petri Latvala <petri.latvala@intel.com> | 2019-01-16 13:20:45 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-01-21 13:51:01 +0200 |
commit | 733228fbcf5aa813d74f14ed4d488f11330d2827 (patch) | |
tree | 0b7e6acc0ed5a513a0b269e8ee9f86e576356fa7 /lib/igt_core.c | |
parent | 13e67a6e21efd1cd800b0366f6cd13ace30677f1 (diff) |
lib/igt_core: Assert that optarg is present
If getopt_long is told an argument is required, it will give it.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 7c727edc..26dd2789 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -760,6 +760,7 @@ static int common_init(int *argc, char **argv, list_subtests = true; break; case OPT_RUN_SUBTEST: + assert(optarg); if (!list_subtests) run_single_subtest = strdup(optarg); break; |