bpo-40898: Remove redundant if statements in tp_traverse (GH-20692)

This commit is contained in:
Hai Shi 2020-06-07 20:05:36 +08:00 committed by GitHub
parent b8867e5d5a
commit 47a23fc63f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 13 deletions

View file

@ -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;
}