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>
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 93eda62..2d48a11 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1501,7 +1501,7 @@
{
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;
}