From: amitkuma Date: Mon, 28 Aug 2017 16:46:18 +0000 (+0530) Subject: os: Removing dead code from LFNIndex.cc X-Git-Tag: v13.0.1~1133^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17297%2Fhead;p=ceph.git os: Removing dead code from LFNIndex.cc 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 --- diff --git a/src/os/filestore/LFNIndex.cc b/src/os/filestore/LFNIndex.cc index b3e451f62b1f..9c4765e622b0 100644 --- a/src/os/filestore/LFNIndex.cc +++ b/src/os/filestore/LFNIndex.cc @@ -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,