From: Dong-hee Na Date: Thu, 1 Oct 2020 04:50:40 +0000 (+0900) Subject: bpo-41870: Avoid the test when nargs=0 (GH-22462) X-Git-Tag: v3.10.0a1~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa7ce080175f65d678a7d5756c94f82887fc9803;p=thirdparty%2FPython%2Fcpython.git bpo-41870: Avoid the test when nargs=0 (GH-22462) --- diff --git a/Objects/boolobject.c b/Objects/boolobject.c index ab7669cb240d..b786966533e1 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -72,9 +72,9 @@ bool_vectorcall(PyObject *type, PyObject * const*args, assert(PyType_Check(type)); if (nargs) { ok = PyObject_IsTrue(args[0]); - } - if (ok < 0) { - return NULL; + if (ok < 0) { + return NULL; + } } return PyBool_FromLong(ok); }