From: Jonathan Lebon Date: Fri, 26 Jul 2013 17:58:21 +0000 (-0400) Subject: session.cxx: add assert statement for benchmark opts X-Git-Tag: release-2.4~184 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=6c116ee45725a36a0013ed63e3a977900e2b370a;p=systemtap.git session.cxx: add assert statement for benchmark opts --- diff --git a/session.cxx b/session.cxx index fc799b685..e23a4f9f8 100644 --- a/session.cxx +++ b/session.cxx @@ -1278,11 +1278,13 @@ systemtap_session::parse_cmdline (int argc, char * const argv []) break; case LONG_OPT_BENCHMARK_SDT_LOOPS: + assert(optarg != 0); // optarg can't be NULL (or getopt would choke) // XXX This option is secret, not supported, subject to change at our whim benchmark_sdt_loops = strtoul(optarg, NULL, 10); break; case LONG_OPT_BENCHMARK_SDT_THREADS: + assert(optarg != 0); // optarg can't be NULL (or getopt would choke) // XXX This option is secret, not supported, subject to change at our whim benchmark_sdt_threads = strtoul(optarg, NULL, 10); break;