From 6c116ee45725a36a0013ed63e3a977900e2b370a Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 26 Jul 2013 13:58:21 -0400 Subject: [PATCH] session.cxx: add assert statement for benchmark opts --- session.cxx | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.43.5