Mercurial > hg-stable
changeset 23799:ffca0a14b566
readmarkers: hoist subtraction out of loop comparison
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 11 Jan 2015 14:44:57 -0600 |
parents | 86d2a0c41f44 |
children | 83f361a21d31 |
files | mercurial/obsolete.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/obsolete.py Sun Jan 11 14:43:31 2015 -0600 +++ b/mercurial/obsolete.py Sun Jan 11 14:44:57 2015 -0600 @@ -287,9 +287,9 @@ def _fm1readmarkers(data, off=0): # Loop on markers - l = len(data) + stop = len(data) - _fm1fsize ufixed = util.unpacker(_fm1fixed) - while off + _fm1fsize <= l: + while off <= stop: # read fixed part o1 = off + _fm1fsize fixeddata = ufixed(data[off:o1])