From b57b4ac042b977e0b42a2f5ddb30ca7edffacfa9 Mon Sep 17 00:00:00 2001 From: Alexey Izbyshev Date: Sun, 26 Aug 2018 02:52:27 +0300 Subject: closes bpo-34504: Remove the useless NULL check in PySequence_Check(). (GH-8935) Reported by Svace static analyzer. --- Objects/abstract.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/abstract.c b/Objects/abstract.c index 8d3030a..305910c 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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; } -- cgit v0.12