mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Remove useless assignments
Warnings found by the the Clang Static Analyzer.
This commit is contained in:
parent
58bc7a134e
commit
25095b2be6
2 changed files with 4 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue