From 05050b2f69c524bd2381f9739ff74ebefc4fea4a Mon Sep 17 00:00:00 2001 From: amitkuma Date: Tue, 29 Aug 2017 20:28:53 +0530 Subject: [PATCH] osd: Deleting dead code PrimaryLogPG.cc Fixes the coverity issue: ** 1415775 Logically dead code Here r cannot be less than 0. CID 1415775 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return r; Signed-off-by: Amit Kumar --- src/osd/PrimaryLogPG.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d05ced7d46cfd..e4c24f7024f52 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -4950,10 +4950,6 @@ int PrimaryLogPG::do_sparse_read(OpContext *ctx, OSDOp& osd_op) { last = miter->first + r; } - if (r < 0) { - return r; - } - // verify trailing hole? if (cct->_conf->osd_verify_sparse_read_holes) { uint64_t end = MIN(op.extent.offset + op.extent.length, oi.size); -- 2.39.5