Benjamin Valentin e2639cb53a core/include/kernel_defines.h: Fix index_of()
Calculate the size of the element based on the array given, not based
on the element pointer.

The element might as well be given as a `void *` via a callback.
In that case, if the user forgets to cast the `void *` to the array
element type, the calculation returns false values.

Disarm this foot gun by basing the element size off the given array.
2021-11-06 00:35:39 +01:00
..
2017-02-16 17:11:22 +01:00
2021-02-02 22:21:14 +01:00
2019-05-02 12:09:37 +02:00
2020-10-23 00:45:56 +02:00
2020-04-21 15:10:56 +02:00
2021-02-02 22:21:14 +01:00
2020-11-06 15:57:56 +01:00
2020-04-28 13:35:05 +02:00
2021-02-02 22:21:14 +01:00
2021-06-02 01:28:22 +02:00
2021-02-02 22:21:14 +01:00
2020-03-30 17:02:08 +02:00
2020-10-23 00:45:56 +02:00
2021-02-02 22:21:14 +01:00