summaryrefslogtreecommitdiffstats
path: root/Modules/overlapped.c
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-06-07 12:05:36 (GMT)
committerGitHub <noreply@github.com>2020-06-07 12:05:36 (GMT)
commit47a23fc63fa5df2da8dbc542e78e521d4a7f10c9 (patch)
tree672aa7892961efc225df0d3949ccb036cc7fe9d9 /Modules/overlapped.c
parentb8867e5d5aca33511942632b5f4e359b9245b2fa (diff)
downloadcpython-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/overlapped.c')
-rw-r--r--Modules/overlapped.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index df6282c..eed8fbf 100644
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -1504,12 +1504,8 @@ Overlapped_traverse(OverlappedObject *self, visitproc visit, void *arg)
}
break;
case TYPE_READ_FROM:
- if(self->read_from.result) {
- Py_VISIT(self->read_from.result);
- }
- if(self->read_from.allocated_buffer) {
- Py_VISIT(self->read_from.allocated_buffer);
- }
+ Py_VISIT(self->read_from.result);
+ Py_VISIT(self->read_from.allocated_buffer);
}
return 0;
}