diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-06-07 12:05:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 12:05:36 (GMT) |
commit | 47a23fc63fa5df2da8dbc542e78e521d4a7f10c9 (patch) | |
tree | 672aa7892961efc225df0d3949ccb036cc7fe9d9 /Modules/_io/_iomodule.c | |
parent | b8867e5d5aca33511942632b5f4e359b9245b2fa (diff) | |
download | cpython-47a23fc63fa5df2da8dbc542e78e521d4a7f10c9.zip cpython-47a23fc63fa5df2da8dbc542e78e521d4a7f10c9.tar.gz cpython-47a23fc63fa5df2da8dbc542e78e521d4a7f10c9.tar.bz2 |
bpo-40898: Remove redundant if statements in tp_traverse (GH-20692)
Diffstat (limited to 'Modules/_io/_iomodule.c')
-rw-r--r-- | Modules/_io/_iomodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index a55e5ca..e430352 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -623,9 +623,7 @@ iomodule_traverse(PyObject *mod, visitproc visit, void *arg) { _PyIO_State *state = get_io_state(mod); if (!state->initialized) return 0; - if (state->locale_module != NULL) { - Py_VISIT(state->locale_module); - } + Py_VISIT(state->locale_module); Py_VISIT(state->unsupported_operation); return 0; } |