From: Danny Al-Gaaf Date: Mon, 11 Mar 2013 13:50:23 +0000 (+0100) Subject: osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left' X-Git-Tag: v0.60~106^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0517a2d537bad98b5975f930570ffbe2049ca45b;p=ceph.git osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left' 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 --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 5edc9c0ffd97..96d6c03b2577 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -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. }