Re-format after recent change to fix linkhash.

This commit is contained in:
Eric Haszlakiewicz
2020-05-10 03:58:27 +00:00
parent 4f43a077a4
commit a59d5acfab
2 changed files with 3 additions and 3 deletions

View File

@@ -580,7 +580,8 @@ int lh_table_insert_w_hash(struct lh_table *t, const void *k, const void *v, con
{
unsigned long n;
if (t->count >= t->size * LH_LOAD_FACTOR) {
if (t->count >= t->size * LH_LOAD_FACTOR)
{
/* Avoid signed integer overflow with large tables. */
int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2);
if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0)