Commit b57b4ac0 authored by Alexey Izbyshev's avatar Alexey Izbyshev Committed by Benjamin Peterson

closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)

Reported by Svace static analyzer.
parent 5f79b507
...@@ -1510,7 +1510,7 @@ PySequence_Check(PyObject *s) ...@@ -1510,7 +1510,7 @@ PySequence_Check(PyObject *s)
{ {
if (PyDict_Check(s)) if (PyDict_Check(s))
return 0; 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; s->ob_type->tp_as_sequence->sq_item != NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment