Skip to content

Commit d6725fc

Browse files
miss-islingtonAlexey Izbyshev
andauthored
closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935)
Reported by Svace static analyzer. (cherry picked from commit b57b4ac) Co-authored-by: Alexey Izbyshev <[email protected]>
1 parent 15dadac commit d6725fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/abstract.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ PySequence_Check(PyObject *s)
15011501
{
15021502
if (PyDict_Check(s))
15031503
return 0;
1504-
return s != NULL && s->ob_type->tp_as_sequence &&
1504+
return s->ob_type->tp_as_sequence &&
15051505
s->ob_type->tp_as_sequence->sq_item != NULL;
15061506
}
15071507

0 commit comments

Comments
 (0)