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

Reported by Svace static analyzer.
(cherry picked from commit b57b4ac042)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
This commit is contained in:
Miss Islington (bot) 2018-08-25 20:03:48 -04:00 committed by GitHub
parent 15dadacabf
commit d6725fcdd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}