summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorAlexey Izbyshev <izbyshev@ispras.ru>2018-08-25 23:52:27 (GMT)
committerBenjamin Peterson <benjamin@python.org>2018-08-25 23:52:27 (GMT)
commitb57b4ac042b977e0b42a2f5ddb30ca7edffacfa9 (patch)
tree8706605eca4697e43f9fe7bd8a5a08b1c5dc52e5 /Objects/abstract.c
parent5f79b50763d687aeeed8edcb4efcc7ac9f8fa186 (diff)
downloadcpython-b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9.zip
cpython-b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9.tar.gz
cpython-b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9.tar.bz2
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
Reported by Svace static analyzer.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 8d3030a..305910c 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1510,7 +1510,7 @@ PySequence_Check(PyObject *s)
{
if (PyDict_Check(s))
return 0;
- return s != NULL && s->ob_type->tp_as_sequence &&
+ return s->ob_type->tp_as_sequence &&
s->ob_type->tp_as_sequence->sq_item != NULL;
}