diff --git a/src/dict.c b/src/dict.c index bc03b0c96..a26ba9eba 100644 --- a/src/dict.c +++ b/src/dict.c @@ -61,7 +61,7 @@ static unsigned int dict_force_resize_ratio = 5; /* -------------------------- private prototypes ---------------------------- */ static int _dictExpandIfNeeded(dict *d); -static char _dictNextExp(unsigned long size); +static signed char _dictNextExp(unsigned long size); static long _dictKeyIndex(dict *d, const void *key, uint64_t hash, dictEntry **existing); static int _dictInit(dict *d, dictType *type); @@ -150,7 +150,7 @@ int _dictExpand(dict *d, unsigned long size, int* malloc_failed) /* the new hash table */ dictEntry **new_ht_table; unsigned long new_ht_used; - char new_ht_size_exp = _dictNextExp(size); + signed char new_ht_size_exp = _dictNextExp(size); /* Detect overflows */ size_t newsize = 1ul<0 rehashing is paused (<0 indicates coding error) */ - char ht_size_exp[2]; /* exponent of size. (size = 1<