summaryrefslogtreecommitdiff
path: root/table
diff options
context:
space:
mode:
authorlntotk <imjunwang@163.com>2020-04-24 02:00:12 +0000
committerlntotk <imjunwang@163.com>2020-04-24 02:00:12 +0000
commit10bc0f2595b8672c0c1756f22051ec420036fdf2 (patch)
treec71e4ccd13a809d85294867ad2cbbcd78d9cf843 /table
parent201f52201f5dd9701e7a8ceaa0ec4d344e69e022 (diff)
downloadleveldb-10bc0f2595b8672c0c1756f22051ec420036fdf2.tar.gz
remove unnessary status judge
Diffstat (limited to 'table')
-rw-r--r--table/table.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/table/table.cc b/table/table.cc
index b07bc88..29e835f 100644
--- a/table/table.cc
+++ b/table/table.cc
@@ -54,13 +54,11 @@ Status Table::Open(const Options& options, RandomAccessFile* file,
// Read the index block
BlockContents index_block_contents;
- if (s.ok()) {
- ReadOptions opt;
- if (options.paranoid_checks) {
- opt.verify_checksums = true;
- }
- s = ReadBlock(file, opt, footer.index_handle(), &index_block_contents);
+ ReadOptions opt;
+ if (options.paranoid_checks) {
+ opt.verify_checksums = true;
}
+ s = ReadBlock(file, opt, footer.index_handle(), &index_block_contents);
if (s.ok()) {
// We've successfully read the footer and the index block: we're