]> sourceware.org Git - systemtap.git/commitdiff
PR11281 Allow negative values for -D argument.
authorMark Wielaard <mjw@redhat.com>
Sun, 14 Feb 2010 20:42:06 +0000 (21:42 +0100)
committerMark Wielaard <mjw@redhat.com>
Sun, 14 Feb 2010 20:42:06 +0000 (21:42 +0100)
Change regexp match to "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$".

* main.cxx (main): case 'D' allow optional single minus sign after equal
  in assert_regexp_match().

main.cxx

index b5fdbc0cf659c19a74cb1d9fa075aec6618e6cce..faac7f811be0096137ac6b8bb79c96b36e53a710 100644 (file)
--- a/main.cxx
+++ b/main.cxx
@@ -821,7 +821,7 @@ main (int argc, char * const argv [])
          break;
 
        case 'D':
-          assert_regexp_match ("-D parameter", optarg, "^[a-z_][a-z_0-9]*(=[a-z_0-9]+)?$");
+          assert_regexp_match ("-D parameter", optarg, "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$");
          if (client_options)
            client_options_disallowed += client_options_disallowed.empty () ? "-D" : ", -D";
          s.macros.push_back (string (optarg));
This page took 0.030935 seconds and 5 git commands to generate.