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
This commit is contained in:
parent
f433a4d67c
commit
ff5de4ff03
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@
|
||||||
#include "assembling.h"
|
#include "assembling.h"
|
||||||
#include "drivers/driver_ids.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) ({ \
|
#define container_of(ptr, type, member) ({ \
|
||||||
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
||||||
|
|
Loading…
Reference in a new issue