Remove deadcode in _Py_inc_count() (GH-18257)

(tp->tp_next != NULL) check became redundant with
commit 45294a9562 (merged in 2006).
This commit is contained in:
Victor Stinner 2020-01-29 19:22:11 +01:00 committed by GitHub
parent db5e86adbc
commit 5428f48b63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -182,8 +182,6 @@ _Py_inc_count(PyTypeObject *tp)
{ {
if (tp->tp_next == NULL && tp->tp_prev == NULL) { if (tp->tp_next == NULL && tp->tp_prev == NULL) {
/* first time; insert in linked list */ /* first time; insert in linked list */
if (tp->tp_next != NULL) /* sanity check */
Py_FatalError("XXX _Py_inc_count sanity check");
if (type_list) if (type_list)
type_list->tp_prev = tp; type_list->tp_prev = tp;
tp->tp_next = type_list; tp->tp_next = type_list;