Skip to content

Commit

Permalink
Fixing all of problems found by vc++ /analyze in GCM code
Browse files Browse the repository at this point in the history
There was only a minor (harmless) case of variable shadowing.

BUG=427616
R=zea@chromium.org

Review URL: https://codereview.chromium.org/713573003

Cr-Commit-Position: refs/heads/master@{#303338}
  • Loading branch information
fgorski authored and Commit bot committed Nov 8, 2014
1 parent 5ee22c5 commit 3e02198
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions google_apis/gcm/engine/gcm_store_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,11 @@ void GCMStoreImpl::Backend::SetGServicesSettings(
// Remove all existing settings.
leveldb::ReadOptions read_options;
read_options.verify_checksums = true;
scoped_ptr<leveldb::Iterator> iter(db_->NewIterator(read_options));
for (iter->Seek(MakeSlice(kGServiceSettingKeyStart));
iter->Valid() && iter->key().ToString() < kGServiceSettingKeyEnd;
iter->Next()) {
write_batch.Delete(iter->key());
scoped_ptr<leveldb::Iterator> db_iter(db_->NewIterator(read_options));
for (db_iter->Seek(MakeSlice(kGServiceSettingKeyStart));
db_iter->Valid() && db_iter->key().ToString() < kGServiceSettingKeyEnd;
db_iter->Next()) {
write_batch.Delete(db_iter->key());
}

// Add the new settings.
Expand Down

0 comments on commit 3e02198

Please sign in to comment.