]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 13:50:23 +0000 (14:50 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 13:50:23 +0000 (14:50 +0100)
Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osdc/ObjectCacher.cc

index 5edc9c0ffd97381c7730a3729fab321c9310dfa2..96d6c03b25772bed7e8f8f3a455fda80b71f6a99 100644 (file)
@@ -206,8 +206,7 @@ int ObjectCacher::Object::map_read(OSDRead *rd,
          ldout(oc->cct, 20) << "map_read miss " << left << " left, " << *n << dendl;
        }
         cur += left;
-        left -= left;
-        assert(left == 0);
+        left = 0;
         assert(cur == (loff_t)ex_it->offset + (loff_t)ex_it->length);
         break;  // no more.
       }