diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 0e5f84699c3..6327c95d2a6 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -189,7 +189,7 @@ get_reentrant(void) static void set_reentrant(int reentrant) { - assert(!reentrant || !get_reentrant()); + assert(reentrant != tracemalloc_reentrant); tracemalloc_reentrant = reentrant; } #endif