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 --- ChangeLog | 6 ++++++ translate.cxx | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99fbfc51..8ad842ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ + +2008-07-09 + + * translate.cxx (visit_comparison): Remove unnecessary comparison. + * translate.cxx (emit_symbol_data): Remove unused local variable. + 2008-07-08 * stap-client (client_sysinfo): Use `uname -rvm`. 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