diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/list.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/list.h b/include/list.h index bbf3425..a59ca00 100644 --- a/include/list.h +++ b/include/list.h @@ -11,7 +11,7 @@ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif -#define container_of(ptr, type, member) ({ \ +#define list_container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) @@ -36,7 +36,7 @@ static inline int list_empty(const struct list_head *head) } #define list_entry(ptr, type, member) \ - container_of(ptr, type, member) + list_container_of(ptr, type, member) #define list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); pos = pos->next) |