From f95103f5d7f4b10ba549ad45ea73a2034b6facf7 Mon Sep 17 00:00:00 2001 From: Alexey Izbyshev Date: Sun, 26 Aug 2018 00:02:48 +0300 Subject: [PATCH] bpo-34504: Remove the redundant NULL check in PySequence_Check() 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 8d3030a118ae54..305910c3584ca0 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; }