From 26388247aa7f85bdd1f46aca914140333ec16793 Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Thu, 29 Sep 2016 13:19:58 -0700 Subject: [PATCH] delete unused variable for PrevInterval() Summary: delete unused variable Test Plan: make check Reviewers: sdong, andrewkr, IslamAbdelRahman, tianx Reviewed By: tianx Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D64509 --- db/db_iter.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/db/db_iter.cc b/db/db_iter.cc index 333fd6fd0..924fb9ac5 100644 --- a/db/db_iter.cc +++ b/db/db_iter.cc @@ -540,7 +540,6 @@ void DBIter::PrevInternal() { } ParsedInternalKey ikey; - bool match_prefix = true; while (iter_->Valid()) { saved_key_.SetKey(ExtractUserKey(iter_->key()), @@ -557,8 +556,7 @@ void DBIter::PrevInternal() { if (valid_ && prefix_extractor_ && prefix_same_as_start_ && prefix_extractor_->Transform(saved_key_.GetKey()) .compare(prefix_start_key_) != 0) { - match_prefix = false; - break; + valid_ = false; } return; } @@ -572,7 +570,7 @@ void DBIter::PrevInternal() { } // We haven't found any key - iterator is not valid // Or the prefix is different than start prefix - assert(!iter_->Valid() || !match_prefix); + assert(!iter_->Valid()); valid_ = false; }