summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-02-04 16:37:02 (GMT)
committerRaymond Hettinger <python@rcn.com>2015-02-04 16:37:02 (GMT)
commit82492826225b0216d9bde704a4b69584c4f31cc5 (patch)
tree30e480d3ba0b70a69c2826fde9342b0a5f9cc50e
parent0afc3dc1830611355df60f8fa4a94e1012dab16b (diff)
downloadcpython-82492826225b0216d9bde704a4b69584c4f31cc5.zip
cpython-82492826225b0216d9bde704a4b69584c4f31cc5.tar.gz
cpython-82492826225b0216d9bde704a4b69584c4f31cc5.tar.bz2
Minor code clean up.
-rw-r--r--Objects/setobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 9bdbbba..23ab95c 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -89,7 +89,7 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
freeslot = entry;
if (i + LINEAR_PROBES <= mask) {
- for (j = 1 ; j <= LINEAR_PROBES ; j++) {
+ for (j = 0 ; j < LINEAR_PROBES ; j++) {
entry++;
if (entry->key == NULL)
goto found_null;
@@ -151,7 +151,7 @@ set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash)
if (entry->key == NULL)
goto found_null;
if (i + LINEAR_PROBES <= mask) {
- for (j = 1; j <= LINEAR_PROBES; j++) {
+ for (j = 0; j < LINEAR_PROBES; j++) {
entry++;
if (entry->key == NULL)
goto found_null;