mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 03:55:20 +00:00
lib: wheel's typo fix
The wheel data structure is a array of list pointers but the alloc for it is using the sizeof (struct listnode *) as the amount to allocate. Even though the (struct listnode *) and (struct list *) sizes are the same, let's list the correct values. Signed-off-by: ron <lyq140hf2006@163.com>
This commit is contained in:
parent
335b15ebe0
commit
5e7d0337f6
@ -94,7 +94,7 @@ struct timer_wheel *wheel_init(struct thread_master *master, int period,
|
||||
wheel->nexttime = period / slots;
|
||||
|
||||
wheel->wheel_slot_lists = XCALLOC(MTYPE_TIMER_WHEEL_LIST,
|
||||
slots * sizeof(struct listnode *));
|
||||
slots * sizeof(struct list *));
|
||||
for (i = 0; i < slots; i++)
|
||||
wheel->wheel_slot_lists[i] = list_new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user