Skip to content

Commit 8919cb4

Browse files
authored
gh-135161: Remove redundant NULL check for 'exc' after dereference in ceval.c (#135162)
1 parent 9258f3d commit 8919cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3190,7 +3190,7 @@ _PyEval_FormatKwargsError(PyThreadState *tstate, PyObject *func, PyObject *kwarg
31903190
else if (_PyErr_ExceptionMatches(tstate, PyExc_KeyError)) {
31913191
PyObject *exc = _PyErr_GetRaisedException(tstate);
31923192
PyObject *args = PyException_GetArgs(exc);
3193-
if (exc && PyTuple_Check(args) && PyTuple_GET_SIZE(args) == 1) {
3193+
if (PyTuple_Check(args) && PyTuple_GET_SIZE(args) == 1) {
31943194
_PyErr_Clear(tstate);
31953195
PyObject *funcstr = _PyObject_FunctionStr(func);
31963196
if (funcstr != NULL) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy