]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Deleting dead code PrimaryLogPG.cc 17339/head
authoramitkuma <amitkuma@redhat.com>
Tue, 29 Aug 2017 14:58:53 +0000 (20:28 +0530)
committeramitkuma <amitkuma@redhat.com>
Tue, 29 Aug 2017 14:58:53 +0000 (20:28 +0530)
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 <amitkuma@redhat.com>
src/osd/PrimaryLogPG.cc

index d05ced7d46cfd0fbd37499f395f22e72518e90db..e4c24f7024f523b152e7e32069b5f6677a05e22d 100644 (file)
@@ -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);