diff options
author | ron <lyq140hf2006@163.com> | 2022-02-10 12:26:53 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-03-16 20:32:50 +0100 |
commit | 5e7d0337f62c3292ca470623fbe07677fa88a32b (patch) | |
tree | e9a12b8e3bad518d95c097ce309db520afd732b0 /lib/wheel.c | |
parent | Merge pull request #10797 from fabioantonini/sysrepo-2.0.41-support (diff) | |
download | frr-5e7d0337f62c3292ca470623fbe07677fa88a32b.tar.xz frr-5e7d0337f62c3292ca470623fbe07677fa88a32b.zip |
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>
Diffstat (limited to 'lib/wheel.c')
-rw-r--r-- | lib/wheel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/wheel.c b/lib/wheel.c index cdf738a13..6e9c88de9 100644 --- a/lib/wheel.c +++ b/lib/wheel.c @@ -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(); |