From 42f93a641804d9a3baeb01b1be4ecb86d4e0eb26 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 5 May 2015 01:06:44 +0200 Subject: [PATCH] os/FileStore.cc: remove dead code Fix for coverity issue caused by 8811df3 (introduced a similar check some lines earlier in the code causing the check to return earlier). at_least: At condition r < 0, the value of r must be at least 0. dead_error_condition: The condition r < 0 cannot be true. CID 1274289 (#1 of 1): Logically dead code (DEADCODE) dead_error_begin: Execution cannot reach this statement Signed-off-by: Danny Al-Gaaf --- src/os/FileStore.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 38c85330dbe..1cc059b0831 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -270,11 +270,7 @@ int FileStore::lfn_open(coll_t cid, IndexedPath path2; IndexedPath *path = &path2; - if (r < 0) { - derr << "error getting collection index for " << cid - << ": " << cpp_strerror(-r) << dendl; - goto fail; - } + r = (*index)->lookup(oid, path, &exist); if (r < 0) { derr << "could not find " << oid << " in index: " -- 2.47.3