Rev 4789: We don't need to mask, as we shift out the bits we were masking anyway. in http://bazaar.launchpad.net/~jameinel/bzr/chk-index
John Arbash Meinel
john at arbash-meinel.com
Wed Oct 28 14:02:30 GMT 2009
At http://bazaar.launchpad.net/~jameinel/bzr/chk-index
------------------------------------------------------------
revno: 4789
revision-id: john at arbash-meinel.com-20091028140223-6t12vddeff2xzyzc
parent: john at arbash-meinel.com-20091028140134-hkegjr19i9spixsj
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: chk-index
timestamp: Wed 2009-10-28 09:02:23 -0500
message:
We don't need to mask, as we shift out the bits we were masking anyway.
-------------- next part --------------
=== modified file 'bzrlib/chk_index.py'
--- a/bzrlib/chk_index.py 2009-10-28 14:01:34 +0000
+++ b/bzrlib/chk_index.py 2009-10-28 14:02:23 +0000
@@ -311,7 +311,7 @@
def _bit_key_to_offset_16(bit_key):
# We want the first 4 bits
c = ord(bit_key[0])
- return (c & 0xF0) >> 4
+ return c >> 4
def _bit_key_to_offset_256(bit_key):
@@ -321,7 +321,7 @@
_struct_H = Struct('>H')
def _bit_key_to_offset_4096(bit_key):
- return (_struct_H.unpack(bit_key[:2])[0] & 0xFFF0) >> 4
+ return _struct_H.unpack(bit_key[:2])[0] >> 4
def _bit_key_to_offset_65536(bit_key):
More information about the bazaar-commits
mailing list