Commit ff5de4ff authored by Bastien Nocera's avatar Bastien Nocera

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
parent f433a4d6
......@@ -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); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment