From 82492826225b0216d9bde704a4b69584c4f31cc5 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 4 Feb 2015 08:37:02 -0800 Subject: Minor code clean up. --- Objects/setobject.c | 4 ++-- 1 file 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; -- cgit v0.12