]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os: Removing dead code from LFNIndex.cc 17297/head
authoramitkuma <amitkuma@redhat.com>
Mon, 28 Aug 2017 16:46:18 +0000 (22:16 +0530)
committeramitkuma <amitkuma@redhat.com>
Mon, 28 Aug 2017 16:46:18 +0000 (22:16 +0530)
Fixes the coverity issue:

** 1394832 Logically dead code
cannot_single: At condition r, the value of r
cannot be equal to 0.
dead_error_condition: The condition r must be true.
CID 1394832 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach the expression
-22 inside this statement: return r ? 0 : -22;.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
src/os/filestore/LFNIndex.cc

index b3e451f62b1f5d51d2e000661b63772ab4efa9d5..9c4765e622b0fcbd34543763340a27431a4974d7 100644 (file)
@@ -1042,7 +1042,7 @@ int LFNIndex::lfn_parse_object_name_keyless(const string &long_name, ghobject_t
   out->hobj.pool = pool;
   if (!r) return -EINVAL;
   string temp = lfn_generate_object_name(*out);
-  return r ? 0 : -EINVAL;
+  return 0;
 }
 
 static bool append_unescaped(string::const_iterator begin,