summaryrefslogtreecommitdiffstats
path: root/Modules/_abc.c
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-03-23 09:19:34 (GMT)
committerGitHub <noreply@github.com>2018-03-23 09:19:34 (GMT)
commitc65bf3fe4a2bde424b79e350f36b7aaa3f6476f6 (patch)
tree91500557cf37f7ef51cc63dab27b89aa70769d1f /Modules/_abc.c
parent56970b8ce9d23269d20a76f13c80e670c856ba7f (diff)
downloadcpython-c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6.zip
cpython-c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6.tar.gz
cpython-c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6.tar.bz2
bpo-32999: ast: Convert useless check to assert (GH-6197)
Diffstat (limited to 'Modules/_abc.c')
-rw-r--r--Modules/_abc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_abc.c b/Modules/_abc.c
index aa091c7..562a2e6 100644
--- a/Modules/_abc.c
+++ b/Modules/_abc.c
@@ -647,9 +647,7 @@ _abc__abc_subclasscheck_impl(PyObject *module, PyObject *self,
assert(PyTuple_Check(mro));
for (pos = 0; pos < PyTuple_GET_SIZE(mro); pos++) {
PyObject *mro_item = PyTuple_GET_ITEM(mro, pos);
- if (mro_item == NULL) {
- goto end;
- }
+ assert(mro_item != NULL);
if ((PyObject *)self == mro_item) {
if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {
goto end;