diff options
author | Alexey Izbyshev <izbyshev@ispras.ru> | 2018-08-25 23:52:27 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2018-08-25 23:52:27 (GMT) |
commit | b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9 (patch) | |
tree | 8706605eca4697e43f9fe7bd8a5a08b1c5dc52e5 | |
parent | 5f79b50763d687aeeed8edcb4efcc7ac9f8fa186 (diff) | |
download | cpython-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.
-rw-r--r-- | Objects/abstract.c | 2 |
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; } |