commit | fa7ce080175f65d678a7d5756c94f82887fc9803 | [log] [tgz] |
---|---|---|
author | Dong-hee Na <donghee.na92@gmail.com> | Thu Oct 01 13:50:40 2020 +0900 |
committer | GitHub <noreply@github.com> | Thu Oct 01 13:50:40 2020 +0900 |
tree | 316d00c0dbccfefea82733721e44599eb6903849 | |
parent | 63298930fb531ba2bb4f23bc3b915dbf1e17e9e1 [diff] [blame] |
bpo-41870: Avoid the test when nargs=0 (GH-22462)
diff --git a/Objects/boolobject.c b/Objects/boolobject.c index ab7669c..b786966 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c
@@ -72,9 +72,9 @@ 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); }