diff options
| author | ron <lyq140hf2006@163.com> | 2022-02-10 19:26:53 +0800 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-03-16 15:32:50 -0400 |
| commit | 5e7d0337f62c3292ca470623fbe07677fa88a32b (patch) | |
| tree | e9a12b8e3bad518d95c097ce309db520afd732b0 | |
| parent | 335b15ebe043f259774aa96c17b2920b5538fd86 (diff) | |
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>
| -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 cdf738a137..6e9c88de9d 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(); |
