mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
Reported by Svace static analyzer.
This commit is contained in:
committed by
Benjamin Peterson
parent
5f79b50763
commit
b57b4ac042
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user