]> granicus.if.org Git - python/commitdiff
Remove redundant check for tb != NULL to shut up Coverity . It has been set to Py_Non...
authorChristian Heimes <christian@python.org>
Thu, 16 Apr 2015 15:25:45 +0000 (17:25 +0200)
committerChristian Heimes <christian@python.org>
Thu, 16 Apr 2015 15:25:45 +0000 (17:25 +0200)
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.

Python/pylifecycle.c

index 56186778f460f0451020da4f835619cd2a50afe9..a17adf7626b010489537d54e073950bfba63fe84 100644 (file)
@@ -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);