summaryrefslogtreecommitdiffstats
path: root/staptree.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-07-11 19:58:00 +0000
committerfche <fche>2005-07-11 19:58:00 +0000
commit3f43362a3e5b1e800819d13e3068328e24589495 (patch)
tree9ca909a6e034ee0ac748c558ef68e584d382ba6f /staptree.cxx
parent24a0bfe975384f1b43ecd64fa86f292db0263b31 (diff)
downloadsystemtap-steved-3f43362a3e5b1e800819d13e3068328e24589495.tar.gz
systemtap-steved-3f43362a3e5b1e800819d13e3068328e24589495.tar.xz
systemtap-steved-3f43362a3e5b1e800819d13e3068328e24589495.zip
2005-07-11 Frank Ch. Eigler <fche@redhat.com>
* parse.cxx (parse_literal): Compile cleanly on 64-bit host. * staptree.cxx (deep_copy_visitor::visit_if_statement): Don't freak on a null if_statement.elseblock.
Diffstat (limited to 'staptree.cxx')
-rw-r--r--staptree.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/staptree.cxx b/staptree.cxx
index 94c04894..7192c4b8 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -1033,7 +1033,10 @@ deep_copy_visitor::visit_if_statement (if_statement* s)
if_statement *n = new if_statement;
require <expression*> (this, &(n->condition), s->condition);
require <statement*> (this, &(n->thenblock), s->thenblock);
- require <statement*> (this, &(n->elseblock), s->elseblock);
+ if (s->elseblock)
+ require <statement*> (this, &(n->elseblock), s->elseblock);
+ else
+ n->elseblock = 0;
provide <if_statement*> (this, n);
}