]> sourceware.org Git - systemtap.git/commitdiff
session.cxx: add assert statement for benchmark opts
authorJonathan Lebon <jlebon@redhat.com>
Fri, 26 Jul 2013 17:58:21 +0000 (13:58 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Fri, 26 Jul 2013 19:00:15 +0000 (15:00 -0400)
session.cxx

index fc799b68582acec5eb2c4e34e421c20e29b5c86f..e23a4f9f8d7b7775fffbe61bdc6da4725a039310 100644 (file)
@@ -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;
This page took 0.031953 seconds and 5 git commands to generate.