summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2015-04-16 15:25:45 (GMT)
committerChristian Heimes <christian@python.org>2015-04-16 15:25:45 (GMT)
commite8e4283cecd99ce7eb07c2786e385d22946e15cd (patch)
treea62b71554094ef9418d0b24dae2aeb92059f1910
parent82adeffc13e50676b94011844865fe458070a24d (diff)
downloadcpython-e8e4283cecd99ce7eb07c2786e385d22946e15cd.zip
cpython-e8e4283cecd99ce7eb07c2786e385d22946e15cd.tar.gz
cpython-e8e4283cecd99ce7eb07c2786e385d22946e15cd.tar.bz2
Remove redundant check for tb != NULL to shut up Coverity . It has been set to Py_None a couple of lines earlier.
CID 1291697 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking tb suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
-rw-r--r--Python/pylifecycle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 5618677..a17adf7 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1283,7 +1283,7 @@ _Py_PrintFatalError(int fd)
goto display_stack;
}
- has_tb = (tb != NULL && tb != Py_None);
+ has_tb = (tb != Py_None);
PyErr_Display(exception, v, tb);
Py_XDECREF(exception);
Py_XDECREF(v);