summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-08-25 20:03:48 -0400
committerGitHub <noreply@github.com>2018-08-25 20:03:48 -0400
commitd6725fcdd54cb3c72201eaa8841dd72d84f5f71d (patch)
tree67106eca6c9fa9989ac0e48fb1a8abb0f40b07fa
parent15dadacabf6a1c62e9920b6a42ff8936ea1830f8 (diff)
downloadcpython-git-d6725fcdd54cb3c72201eaa8841dd72d84f5f71d.tar.gz
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
Reported by Svace static analyzer. (cherry picked from commit b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 93eda62a27..2d48a112aa 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1501,7 +1501,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;
}