aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-02-04 08:37:02 -0800
committerRaymond Hettinger <python@rcn.com>2015-02-04 08:37:02 -0800
commit82492826225b0216d9bde704a4b69584c4f31cc5 (patch)
tree30e480d3ba0b70a69c2826fde9342b0a5f9cc50e
parentMerge 3.4 (asyncio doc) (diff)
downloadcpython-82492826225b0216d9bde704a4b69584c4f31cc5.tar.gz
cpython-82492826225b0216d9bde704a4b69584c4f31cc5.tar.bz2
cpython-82492826225b0216d9bde704a4b69584c4f31cc5.zip
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 9bdbbba19c7..23ab95c715d 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;