From 10bc0f2595b8672c0c1756f22051ec420036fdf2 Mon Sep 17 00:00:00 2001 From: lntotk Date: Fri, 24 Apr 2020 02:00:12 +0000 Subject: remove unnessary status judge --- table/table.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'table') 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 -- cgit v1.2.1