summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2005-07-29 02:03:12 +0000
committerfche <fche>2005-07-29 02:03:12 +0000
commit84e5ea0fe20a907f24c415940fc3e7e5a718efda (patch)
tree6132fac174affa7f042eb7268dd3306dfed47282
parent77de5e9eca19f041e85681439f41ea35d30a37c9 (diff)
downloadsystemtap-steved-84e5ea0fe20a907f24c415940fc3e7e5a718efda.tar.gz
systemtap-steved-84e5ea0fe20a907f24c415940fc3e7e5a718efda.tar.xz
systemtap-steved-84e5ea0fe20a907f24c415940fc3e7e5a718efda.zip
2005-07-28 Frank Ch. Eigler <fche@elastic.org>
* elaborate.cxx (find_var): Correct array dereferencing thinko.
-rw-r--r--ChangeLog4
-rw-r--r--elaborate.cxx26
2 files changed, 18 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 30c5f715..31f27312 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-07-28 Frank Ch. Eigler <fche@elastic.org>
+
+ * elaborate.cxx (find_var): Correct array dereferencing thinko.
+
2005-07-28 Graydon Hoare <graydon@redhat.com>
* elaborate.cxx (derived_probe::derived_probe): Accept NULL probe.
diff --git a/elaborate.cxx b/elaborate.cxx
index 76c5b39c..958472c5 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -852,18 +852,20 @@ symresolution_info::find_var (const string& name, unsigned arity)
{
stapfile* f = session.library_files[i];
for (unsigned j=0; j<f->globals.size(); j++)
- if (f->globals[j]->name == name
- && f->globals[i]->compatible_arity(arity))
- {
- f->globals[j]->set_arity (arity);
-
- // put library into the queue if not already there
- if (find (session.files.begin(), session.files.end(), f)
- == session.files.end())
- session.files.push_back (f);
-
- return f->globals[j];
- }
+ {
+ vardecl* g = f->globals[j];
+ if (g->name == name && g->compatible_arity (arity))
+ {
+ g->set_arity (arity);
+
+ // put library into the queue if not already there
+ if (find (session.files.begin(), session.files.end(), f)
+ == session.files.end())
+ session.files.push_back (f);
+
+ return g;
+ }
+ }
}
// search builtins that become locals