]> git.proxmox.com Git - mirror_frr.git/blobdiff - tests/lib/test_timer_performance.c
* : update signature of thread_cancel api
[mirror_frr.git] / tests / lib / test_timer_performance.c
index 2960e0d81e2382e081bb9578ecae58cd5d590260..45b29b92b1ec30204afc9351ee5c2a1610bde310 100644 (file)
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
                thread_add_timer_msec(master, dummy_func, NULL, 0, &timers[i]);
        }
        for (i = 0; i < SCHEDULE_TIMERS; i++)
-               thread_cancel(timers[i]);
+               thread_cancel(&timers[i]);
 
        monotime(&tv_start);
 
@@ -78,8 +78,7 @@ int main(int argc, char **argv)
                int index;
 
                index = prng_rand(prng) % SCHEDULE_TIMERS;
-               if (timers[index])
-                       thread_cancel(timers[index]);
+               thread_cancel(&timers[index]);
                timers[index] = NULL;
        }