]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore.cc: remove dead code
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 4 May 2015 23:06:44 +0000 (01:06 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 1 Jun 2015 04:59:26 +0000 (06:59 +0200)
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 <danny.al-gaaf@bisect.de>
src/os/FileStore.cc

index 38c85330dbef80c7d334356c0e493c28348ca8a3..1cc059b083143c0081a35fd92c1bb75ea7805746 100644 (file)
@@ -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: "