mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-41061: Fix incorrect expressions in hashtable (GH-21028)
Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
		
							parent
							
								
									d780fa7931
								
							
						
					
					
						commit
						4901ea9526
					
				
					 3 changed files with 5 additions and 4 deletions
				
			
		|  | @ -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; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Christian Heimes
						Christian Heimes