summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-06-22 08:01:48 (GMT)
committerGitHub <noreply@github.com>2020-06-22 08:01:48 (GMT)
commitf19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac (patch)
tree7eac26165dbb1687a2d8879b2dfec251dc63c4eb /Python
parent9fe5decf5f38ae247f4f354dee27e4bfbe8bc5f8 (diff)
downloadcpython-f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac.zip
cpython-f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac.tar.gz
cpython-f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac.tar.bz2
bpo-41061: Fix incorrect expressions in hashtable (GH-21028)
Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 4901ea952691ad70aae21cfe04b6bd363b5a6aff) Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Python')
-rw-r--r--Python/hashtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/hashtable.c b/Python/hashtable.c
index b92e8ca..09501de 100644
--- a/Python/hashtable.c
+++ b/Python/hashtable.c
@@ -133,7 +133,7 @@ _Py_hashtable_get_entry_generic(_Py_hashtable_t *ht, const void *key)
{
Py_uhash_t key_hash = ht->hash_func(key);
size_t index = key_hash & (ht->nbuckets - 1);
- _Py_hashtable_entry_t *entry = entry = TABLE_HEAD(ht, index);
+ _Py_hashtable_entry_t *entry = TABLE_HEAD(ht, index);
while (1) {
if (entry == NULL) {
return NULL;
@@ -155,7 +155,7 @@ _Py_hashtable_get_entry_ptr(_Py_hashtable_t *ht, const void *key)
{
Py_uhash_t key_hash = _Py_hashtable_hash_ptr(key);
size_t index = key_hash & (ht->nbuckets - 1);
- _Py_hashtable_entry_t *entry = entry = TABLE_HEAD(ht, index);
+ _Py_hashtable_entry_t *entry = TABLE_HEAD(ht, index);
while (1) {
if (entry == NULL) {
return NULL;