From 26de79f7a2b4db7c123f43cca0d01f5a505103d5 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Wed, 9 Jul 2008 18:06:39 -0400 Subject: Slightly cleanup code of translate.cxx --- translate.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index e9dff3c7..557c2f12 100644 --- a/translate.cxx +++ b/translate.cxx @@ -3134,8 +3134,7 @@ c_unparser::visit_comparison (comparison* e) if (e->left->type == pe_string) { - if (e->left->type != pe_string || - e->right->type != pe_string) + if (e->right->type != pe_string) throw semantic_error ("expected string types", e->tok); o->line() << "strncmp ("; @@ -3147,8 +3146,7 @@ c_unparser::visit_comparison (comparison* e) } else if (e->left->type == pe_long) { - if (e->left->type != pe_long || - e->right->type != pe_long) + if (e->right->type != pe_long) throw semantic_error ("expected numeric types", e->tok); o->line() << "(("; @@ -4424,7 +4422,7 @@ emit_symbol_data (systemtap_session& s) // so parse /proc/kallsyms. ifstream kallsyms("/proc/kallsyms"); - string lastaddr, modules_op_addr; + string lastaddr; kallsyms_out << "struct _stp_symbol _stp_kernel_symbols [] = {"; while (! kallsyms.eof()) -- cgit