1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2020, Linaro Limited 4 */ 5 6 #ifndef LIBCKTEEC_LOCAL_UTILS_H 7 #define LIBCKTEEC_LOCAL_UTILS_H 8 9 #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) 10 11 #define COMPILE_TIME_ASSERT(x) \ 12 do { \ 13 switch (0) { case 0: case ((x) ? 1: 0) : default : break; } \ 14 } while (0) 15 16 #endif /*LIBCKTEEC_LOCAL_UTILS_H*/ 17