[Python-checkins] cpython: Minor cleanup.

raymond.hettinger python-checkins at python.org
Sat Jul 4 17:46:36 CEST 2015


https://hg.python.org/cpython/rev/7ed4503b73a7
changeset:   96798:7ed4503b73a7
user:        Raymond Hettinger <python at rcn.com>
date:        Sat Jul 04 08:46:31 2015 -0700
summary:
  Minor cleanup.

files:
  Objects/setobject.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Objects/setobject.c b/Objects/setobject.c
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -963,7 +963,7 @@
         * incrementally resizing as we insert new keys.  Expect
         * that there will be no (or few) overlapping keys.
         */
-        if (dictsize == -1)
+        if (dictsize < 0)
             return -1;
         if ((so->fill + dictsize)*3 >= so->mask*2) {
             if (set_table_resize(so, so->used + dictsize) != 0)
@@ -1457,7 +1457,7 @@
         entry.key = key;
         rv = set_contains_entry(so, &entry);
         Py_DECREF(key);
-        if (rv == -1) {
+        if (rv < 0) {
             Py_DECREF(it);
             return NULL;
         }

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list