瀏覽代碼

[ht.h] removing unneded if in GET

Vinicius Teshima 1 年之前
父節點
當前提交
5ebe8c24e4
共有 1 個文件被更改,包括 0 次插入8 次删除
  1. 0 8
      src/ht.h

+ 0 - 8
src/ht.h

@@ -154,14 +154,6 @@ uint64_t ht_default_hash(const char *str, size_t str_size);
 	do {								\
 		uint64_t _k = (ht).hash((_key), (_key_size));		\
 		typeof(*(ht).items) *_it = &(ht).items[_k % (ht).cap];	\
-		if ( _it->key != _k ) {				\
-			while( _it->key != _k && _it->next != NULL ) {	\
-				_it = _it->next;			\
-			}						\
-			if ( _it->key != _k ) {			\
-				break;					\
-			}						\
-		}							\
 		(ret) = _it->data;					\
 	} while(0)