Commit f05fc716 authored by Guido van Rossum's avatar Guido van Rossum

Remove dead code discovered by Vladimir Marangozov.

parent da30f4ca
...@@ -191,9 +191,6 @@ lookdict(mp, key, hash) ...@@ -191,9 +191,6 @@ lookdict(mp, key, hash)
incr = (hash ^ ((unsigned long)hash >> 3)) & mask; incr = (hash ^ ((unsigned long)hash >> 3)) & mask;
if (!incr) if (!incr)
incr = mask; incr = mask;
else if (incr > mask) /* Cycle through GF(2^n)-{0} */
incr ^= mp->ma_poly; /* This will implicitly clear the
highest bit */
for (;;) { for (;;) {
ep = &ep0[(i+incr)&mask]; ep = &ep0[(i+incr)&mask];
if (ep->me_key == NULL) { if (ep->me_key == NULL) {
...@@ -215,7 +212,8 @@ lookdict(mp, key, hash) ...@@ -215,7 +212,8 @@ lookdict(mp, key, hash)
/* Cycle through GF(2^n)-{0} */ /* Cycle through GF(2^n)-{0} */
incr = incr << 1; incr = incr << 1;
if (incr > mask) if (incr > mask)
incr ^= mp->ma_poly; incr ^= mp->ma_poly; /* This will implicitely clear
the highest bit */
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment