]> sourceware.org Git - systemtap.git/commitdiff
parser::parse_global(): break after seeing a termination token.
authorMark Wielaard <mjw@redhat.com>
Sat, 29 Sep 2012 17:13:47 +0000 (19:13 +0200)
committerMark Wielaard <mjw@redhat.com>
Sun, 30 Sep 2012 21:42:30 +0000 (23:42 +0200)
The code would swallow the terminating token and then inspect whether it
was a ','. Which it obviously wasn't since we had just seen that it was
a ';'.

parse.cxx

index f4604477bf1ebfaf7697897e7abf2c04b0fe9cd3..1c314714906ce9f4545ea442fa4da9f3d2517ed7 100644 (file)
--- a/parse.cxx
+++ b/parse.cxx
@@ -2108,7 +2108,10 @@ parser::parse_global (vector <vardecl*>& globals, vector<probe*>&)
        }
 
       if (t && t->type == tok_operator && t->content == ";") // termination
+       {
          swallow ();
+         break;
+       }
 
       if (t && t->type == tok_operator && t->content == ",") // next global
        {
This page took 0.031446 seconds and 5 git commands to generate.