From: amitkuma Date: Tue, 29 Aug 2017 14:58:53 +0000 (+0530) Subject: osd: Deleting dead code PrimaryLogPG.cc X-Git-Tag: v13.0.1~1106^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05050b2f69c524bd2381f9739ff74ebefc4fea4a;p=ceph.git 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 --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d05ced7d46cf..e4c24f7024f5 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);