From 9522ae41d6167ea32a4b30ffcf0b21fc4db80c2b Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Sun, 6 Dec 2020 19:03:13 -0800 Subject: [PATCH] Move n_search outside of assert as reported by static analyzer --- src/background_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/background_thread.c b/src/background_thread.c index d4f96b1a..7302a303 100644 --- a/src/background_thread.c +++ b/src/background_thread.c @@ -185,7 +185,8 @@ arena_decay_compute_purge_interval_impl(tsdn_t *tsdn, decay_t *decay, lb = target; npurge_lb = npurge; } - assert(n_search++ < lg_floor(SMOOTHSTEP_NSTEPS) + 1); + assert(n_search < lg_floor(SMOOTHSTEP_NSTEPS) + 1); + ++n_search; } interval = decay_interval_ns * (ub + lb) / 2; label_done: