include: fix a compiler warning on GNU/FreeBSD.
This commit is contained in:
parent
5a244bc863
commit
cc34e75385
|
@ -221,9 +221,11 @@ static inline void list_move_head( struct list *dst, struct list *src )
|
||||||
(cursor2) = LIST_ENTRY((cursor)->field.prev, type, field))
|
(cursor2) = LIST_ENTRY((cursor)->field.prev, type, field))
|
||||||
|
|
||||||
/* macros for statically initialized lists */
|
/* macros for statically initialized lists */
|
||||||
|
#undef LIST_INIT
|
||||||
#define LIST_INIT(list) { &(list), &(list) }
|
#define LIST_INIT(list) { &(list), &(list) }
|
||||||
|
|
||||||
/* get pointer to object containing list element */
|
/* get pointer to object containing list element */
|
||||||
|
#undef LIST_ENTRY
|
||||||
#define LIST_ENTRY(elem, type, field) \
|
#define LIST_ENTRY(elem, type, field) \
|
||||||
((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))
|
((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue