From ff5de4ff0303469ecf52556ea788ca00446cec36 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 26 Apr 2018 17:07:05 +0200 Subject: [PATCH] lib: Replace open-coded array_n_elements() Replace it with glib's version, which already exists. https://bugs.freedesktop.org/show_bug.cgi?id=106280 --- libfprint/fp_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfprint/fp_internal.h b/libfprint/fp_internal.h index 15c7cbd..6d8849b 100644 --- a/libfprint/fp_internal.h +++ b/libfprint/fp_internal.h @@ -36,7 +36,7 @@ #include "assembling.h" #include "drivers/driver_ids.h" -#define array_n_elements(array) (sizeof(array) / sizeof(array[0])) +#define array_n_elements(array) G_N_ELEMENTS(array) #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \