summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 229d64c..64de38b 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -325,11 +325,7 @@ list_contains(PyListObject *a, PyObject *el)
for (i = 0, cmp = 0 ; cmp == 0 && i < a->ob_size; ++i)
cmp = PyObject_RichCompareBool(el, PyList_GET_ITEM(a, i),
Py_EQ);
- if (cmp > 0)
- return 1;
- if (cmp < 0)
- return -1;
- return 0;
+ return cmp;
}