1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 07:21:18 +01:00
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
..
2021-02-02 22:21:14 +01:00
2020-03-30 17:02:08 +02:00
2021-02-02 22:21:14 +01:00
2021-08-13 19:50:38 +02:00
2021-02-02 22:21:14 +01:00
2020-12-29 11:48:48 +01:00
2020-03-30 17:02:08 +02:00
2020-03-30 17:02:08 +02:00
2020-03-30 17:02:08 +02:00
2020-11-23 16:56:34 +01:00
2021-02-23 13:37:19 +01:00