]> granicus.if.org Git - python/commitdiff
Minor tweeak to tighten the inner-loop.
authorRaymond Hettinger <python@rcn.com>
Fri, 26 Jun 2015 09:50:21 +0000 (02:50 -0700)
committerRaymond Hettinger <python@rcn.com>
Fri, 26 Jun 2015 09:50:21 +0000 (02:50 -0700)
Objects/setobject.c

index 5b430b380e530fc498d32d0882ebb1efdbada1bc..85cb4bc16a873cb8c64d5f1399df238b73ef2aa9 100644 (file)
@@ -199,7 +199,7 @@ set_insert_key(PySetObject *so, PyObject *key, Py_hash_t hash)
                         goto found_active;
                     mask = so->mask;
                 }
-                if (entry->hash == -1 && freeslot == NULL)
+                else if (entry->hash == -1 && freeslot == NULL)
                     freeslot = entry;
             }
         }