use ARRAYLEN

This commit is contained in:
Philippe Teuwen 2022-01-09 14:25:10 +01:00
parent 2269ad6914
commit 33ef5f4243

View file

@ -47,7 +47,7 @@ typedef struct mode_t {
#define START_MODE_LIST mode_t *mode_list[] = {
#define ADD_MODE(name) &MODE_INTERNAL_NAME(name),
#define END_MODE_LIST }; static const int NUM_MODES = sizeof(mode_list) / sizeof(mode_t*);
#define END_MODE_LIST }; static const int NUM_MODES = ARRAYLEN(mode_list);
#else