summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-26 11:47:08 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-26 11:47:08 (GMT)
commit25095b2be655cbe88a05e99f6956aa29cf6207d9 (patch)
tree9cb0a6ed36b1bbe62db239f5ea0a85f2ae4149bc /Modules
parent58bc7a134e5a1f6ee5eadb13bbfda45638468345 (diff)
downloadcpython-25095b2be655cbe88a05e99f6956aa29cf6207d9.zip
cpython-25095b2be655cbe88a05e99f6956aa29cf6207d9.tar.gz
cpython-25095b2be655cbe88a05e99f6956aa29cf6207d9.tar.bz2
Remove useless assignments
Warnings found by the the Clang Static Analyzer.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/faulthandler.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 83c47ce..46c2c42 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1005,9 +1005,10 @@ static int
faulthandler_env_options(void)
{
PyObject *xoptions, *key, *module, *res;
- int enable;
if (!Py_GETENV("PYTHONFAULTHANDLER")) {
+ int has_key;
+
xoptions = PySys_GetXOptions();
if (xoptions == NULL)
return -1;
@@ -1016,13 +1017,11 @@ faulthandler_env_options(void)
if (key == NULL)
return -1;
- enable = PyDict_Contains(xoptions, key);
+ has_key = PyDict_Contains(xoptions, key);
Py_DECREF(key);
- if (!enable)
+ if (!has_key)
return 0;
}
- else
- enable = 1;
module = PyImport_ImportModule("faulthandler");
if (module == NULL) {