ensure_valid_bucket_pointers(hash_table);
/* Free all the entries. */
- size = 1 << hash_table->size_log2;
+ size = ((size_t) 1) << hash_table->size_log2;
for (i = 0; i < size; ++i)
{
dsa_pointer item_pointer = hash_table->buckets[i];
dsa_pointer new_buckets_shared;
dsa_pointer *new_buckets;
size_t size;
- size_t new_size = 1 << new_size_log2;
+ size_t new_size = ((size_t) 1) << new_size_log2;
size_t i;
/*
new_buckets = dsa_get_address(hash_table->area, new_buckets_shared);
/*
- * We've allocate the new bucket array; all that remains to do now is to
+ * We've allocated the new bucket array; all that remains to do now is to
* reinsert all items, which amounts to adjusting all the pointers.
*/
- size = 1 << hash_table->control->size_log2;
+ size = ((size_t) 1) << hash_table->control->size_log2;
for (i = 0; i < size; ++i)
{
dsa_pointer item_pointer = hash_table->buckets[i];
* members tranche_id and tranche_name do not need to be initialized when
* attaching to an existing hash table.
*
- * Compare and hash functions mus be supplied even when attaching, because we
+ * Compare and hash functions must be supplied even when attaching, because we
* can't safely share function pointers between backends in general. Either
* the arg variants or the non-arg variants should be supplied; the other
* function pointers should be NULL. If the arg varants are supplied then the