summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-07-04 15:46:31 (GMT)
committerRaymond Hettinger <python@rcn.com>2015-07-04 15:46:31 (GMT)
commitc2480dc0c4cf13719c5aa514db9f579990a1603f (patch)
tree6de7b3ad5037dd14d1ccbd2e2b689e5cebff39f3 /Objects/setobject.c
parent28e15efce64ad67178a2ff86307410ab12969b7e (diff)
downloadcpython-c2480dc0c4cf13719c5aa514db9f579990a1603f.zip
cpython-c2480dc0c4cf13719c5aa514db9f579990a1603f.tar.gz
cpython-c2480dc0c4cf13719c5aa514db9f579990a1603f.tar.bz2
Minor cleanup.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index ed588ed..8e56f72 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -963,7 +963,7 @@ set_update_internal(PySetObject *so, PyObject *other)
* 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 @@ set_isdisjoint(PySetObject *so, PyObject *other)
entry.key = key;
rv = set_contains_entry(so, &entry);
Py_DECREF(key);
- if (rv == -1) {
+ if (rv < 0) {
Py_DECREF(it);
return NULL;
}