mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-02 18:56:53 +00:00
tests: Do not explicitly set the thread pointer to NULL
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>
This commit is contained in:
parent
bf5335cf34
commit
feabd51dae
@ -134,7 +134,6 @@ int main(int argc, char **argv)
|
||||
/* Schedule timers to expire in 0..5 seconds */
|
||||
interval_msec = prng_rand(prng) % 5000;
|
||||
arg = XMALLOC(MTYPE_TMP, TIMESTR_LEN + 1);
|
||||
timers[i] = NULL;
|
||||
thread_add_timer_msec(master, timer_func, arg, interval_msec,
|
||||
&timers[i]);
|
||||
ret = snprintf(arg, TIMESTR_LEN + 1, "%lld.%06lld",
|
||||
|
@ -55,7 +55,6 @@ int main(int argc, char **argv)
|
||||
/* create thread structures so they won't be allocated during the
|
||||
* time measurement */
|
||||
for (i = 0; i < SCHEDULE_TIMERS; i++) {
|
||||
timers[i] = NULL;
|
||||
thread_add_timer_msec(master, dummy_func, NULL, 0, &timers[i]);
|
||||
}
|
||||
for (i = 0; i < SCHEDULE_TIMERS; i++)
|
||||
@ -67,7 +66,6 @@ int main(int argc, char **argv)
|
||||
long interval_msec;
|
||||
|
||||
interval_msec = prng_rand(prng) % (100 * SCHEDULE_TIMERS);
|
||||
timers[i] = NULL;
|
||||
thread_add_timer_msec(master, dummy_func, NULL, interval_msec,
|
||||
&timers[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user