From 47a23fc63fa5df2da8dbc542e78e521d4a7f10c9 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Sun, 7 Jun 2020 20:05:36 +0800 Subject: bpo-40898: Remove redundant if statements in tp_traverse (GH-20692) --- Modules/itertoolsmodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Modules/itertoolsmodule.c') diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 18fcebdf25..3f2f7165b1 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -999,8 +999,7 @@ cycle_dealloc(cycleobject *lz) static int cycle_traverse(cycleobject *lz, visitproc visit, void *arg) { - if (lz->it) - Py_VISIT(lz->it); + Py_VISIT(lz->it); Py_VISIT(lz->saved); return 0; } -- cgit v1.2.1