We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bb55e2 commit 9f65bc6Copy full SHA for 9f65bc6
src/cstl_types_aux.c
@@ -143,7 +143,7 @@ size_t _type_hash(const char* s_typename)
143
t_hash = t_hash * _TYPE_HASH_BKDR_SEED + (*s_typename++);
144
}
145
146
- return (t_hash & 0x7fffffff) % _TYPE_REGISTER_BUCKET_COUNT;
+ return t_hash % _TYPE_REGISTER_BUCKET_COUNT;
147
148
149
/**
test/ut/ut_cstl_types_aux.c
@@ -50,7 +50,7 @@ void test__type_hash__equalto_bucketcount(void** state)
50
51
void test__type_hash__greaterthan_bucketcount(void** state)
52
{
53
- assert_true(_type_hash("abcabcabcabcabc") == 118);
+ assert_true(_type_hash("abcdefghijklmnopqrstuvwxyzz") == 278);
54
55
56
#define TEST__TYPE_REGISTER_BEGIN()\
0 commit comments