From cef851b757ec043a4275bb79cf5763631d389c7c Mon Sep 17 00:00:00 2001 From: amitkuma Date: Mon, 28 Aug 2017 22:16:18 +0530 Subject: [PATCH] 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 --- src/os/filestore/LFNIndex.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/filestore/LFNIndex.cc b/src/os/filestore/LFNIndex.cc index b3e451f62b1f5..9c4765e622b0f 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, -- 2.39.5