From b9e76b9bf69a6ce183a1a3fb19561a3843bfbd91 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 7897a2e..c352e6f 100644 --- a/libfprint/fp_internal.h +++ b/libfprint/fp_internal.h @@ -28,7 +28,7 @@ #include -#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); \ -- 2.17.0