bpo-29476: Simplify set_add_entry() (#5175)

This commit is contained in:
Raymond Hettinger 2018-01-14 10:20:13 -08:00 committed by GitHub
parent d37258dd2e
commit 3329992e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
goto restart;
mask = so->mask; /* help avoid a register spill */
}
else if (entry->hash == -1 && freeslot == NULL)
else if (entry->hash == -1)
freeslot = entry;
if (i + LINEAR_PROBES <= mask) {
@ -216,7 +216,7 @@ set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
goto restart;
mask = so->mask;
}
else if (entry->hash == -1 && freeslot == NULL)
else if (entry->hash == -1)
freeslot = entry;
}
}