summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2006-05-01 17:41:10 +0000
committerfche <fche>2006-05-01 17:41:10 +0000
commitf5334f06d202d6af44c024b984f3860906bf7009 (patch)
tree80b1551f78fa8a1b249cd335151a85f14c02f20b
parent35ba8b8361be63dc90c8d8cda17d291370f02200 (diff)
downloadsystemtap-steved-f5334f06d202d6af44c024b984f3860906bf7009.tar.gz
systemtap-steved-f5334f06d202d6af44c024b984f3860906bf7009.tar.xz
systemtap-steved-f5334f06d202d6af44c024b984f3860906bf7009.zip
2006-05-01 Frank Ch. Eigler <fche@elastic.org>
* translate.cxx (visit_print_format): Fix regression in "printf" pseudo-result initialization.
-rw-r--r--ChangeLog5
-rw-r--r--translate.cxx7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index aa5f720d..39ff7105 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-01 Frank Ch. Eigler <fche@elastic.org>
+
+ * translate.cxx (visit_print_format): Fix regression in
+ "printf" pseudo-result initialization.
+
2006-04-30 Frank Ch. Eigler <fche@elastic.org>
PR 2610.
diff --git a/translate.cxx b/translate.cxx
index ef97a99e..b4c54a8d 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -3535,12 +3535,13 @@ c_unparser::visit_print_format (print_format* e)
tmpvar res = gensym (ty);
// Make the [s]printf call, but not if there was an error evaluating the args
- o->newline() << res.qname() << " = 0;";
-
o->newline() << "if (likely (! c->last_error))";
o->indent(1);
if (e->print_to_stream)
- o->newline() << "_stp_printf (";
+ {
+ o->newline() << res.qname() << " = 0;";
+ o->newline() << "_stp_printf (";
+ }
else
o->newline() << "_stp_snprintf (" << res.qname() << ", MAXSTRINGLEN, ";