summaryrefslogtreecommitdiffstats
path: root/base/stats_table.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 22:24:50 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 22:24:50 +0000
commit6df4074a8f9ab6039c7cb8807b61b52599d14040 (patch)
tree12cfef7094b77c34f5d0590e5e8546b6be5fcc93 /base/stats_table.cc
parentc1f844dd22d6d2ca74e2d576070f66928737d5cd (diff)
downloadchromium_src-6df4074a8f9ab6039c7cb8807b61b52599d14040.zip
chromium_src-6df4074a8f9ab6039c7cb8807b61b52599d14040.tar.gz
chromium_src-6df4074a8f9ab6039c7cb8807b61b52599d14040.tar.bz2
Fix a bunch of tiny near-bugs and bugs that static analysis identified
r=mbelshe,brettw Review URL: http://codereview.chromium.org/50014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/stats_table.cc')
-rw-r--r--base/stats_table.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/stats_table.cc b/base/stats_table.cc
index d2b6a9e..31f85d5 100644
--- a/base/stats_table.cc
+++ b/base/stats_table.cc
@@ -502,9 +502,9 @@ int StatsTable::GetRowValue(int index, int pid) const {
int rv = 0;
int* row = impl_->row(index);
- for (int index = 0; index < impl_->max_threads(); index++) {
- if (pid == 0 || *impl_->thread_pid(index) == pid)
- rv += row[index];
+ for (int slot_id = 0; slot_id < impl_->max_threads(); slot_id++) {
+ if (pid == 0 || *impl_->thread_pid(slot_id) == pid)
+ rv += row[slot_id];
}
return rv;
}