]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Do not explicitly set the thread pointer to NULL
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 7 Oct 2021 09:22:18 +0000 (12:22 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 8 Oct 2021 05:56:42 +0000 (08:56 +0300)
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
tests/lib/test_timer_correctness.c
tests/lib/test_timer_performance.c

index 0ae9761b117c87f461cb9d3514a087251a690d37..1756d87a6f421c88db2a7e10dae53d585c0e3562 100644 (file)
@@ -153,7 +153,6 @@ int main(int argc, char **argv)
 
                XFREE(MTYPE_TMP, timers[index]->arg);
                thread_cancel(&timers[index]);
-               timers[index] = NULL;
                timers_pending--;
        }
 
index 23c044c7c1a0de84f1066c5150f1d11dd669a9a4..f9d634b6a6d4985f2785b3f77cefa6548b2e47b4 100644 (file)
@@ -77,7 +77,6 @@ int main(int argc, char **argv)
 
                index = prng_rand(prng) % SCHEDULE_TIMERS;
                thread_cancel(&timers[index]);
-               timers[index] = NULL;
        }
 
        monotime(&tv_stop);