byzhang / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Improper condition test in FilterBlockReader::KeyMayMatch #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In FilterBlockReader::KeyMayMatch(), the 'else if (start == limit) ' branch 
never get executed even when start == limit. The flow control always goes into 
the 'if' branch because of the 'start <= limit' condition test.
When met with empty filter, it's not necessary to call policy_->KeyMayMatch at 
all.

Original issue reported on code.google.com by alghak@gmail.com on 6 May 2013 at 1:37

Attachments: