mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-04 08:57:59 +02:00
Fix up ARRAY_FOR_EACH macro
Remove compiler warning about signed/unsigned comparison. And while we're at it, rename i to _i in the macro to avoid name clashes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
40fe4235b9
commit
c9ab49ee0c
1 changed files with 1 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ int list_empty(const struct list *list);
|
|||
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
#define ARRAY_FOR_EACH(_arr, _elem) \
|
||||
for (int i = 0; (_elem = &_arr[i]) && i < ARRAY_LENGTH(_arr); i++)
|
||||
for (size_t _i = 0; (_elem = &_arr[_i]) && _i < ARRAY_LENGTH(_arr); _i++)
|
||||
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue