member_address_is_nonnull(9)
π
member_address_is_nonnull(9) π
Kernel API Manual bestie, weβre doing a vibe check on a member address β is it NULL or not? π«Άβ¨
πΈ NAME πΈ
member_address_is_nonnull β check whether the member address is not NULL π
β¨ SYNOPSIS β¨
member_address_is_nonnull (ptr , member );
π ARGUMENTS π
ptrβ the object pointer (astruct type *that contains thellist_node) π¦memberβ the name of thellist_nodewithin the struct β¨
π DESCRIPTION π
Okay so this macro is conceptually the same as ptr->member != NULL, but it works around the fact that compilers can decide that taking a member address is never a NULL pointer. π
Real objects that start at a high address and have a member at NULL are unlikely to exist, but such pointers may be returned e.g. by the container_of macro. π
π₯ SEE ALSO π₯
Kernel file ./include/linux/llist.h: init_llist_head(9), init_llist_node(9), llist_on_list(9), llist_entry(9), llist_for_each(9), llist_for_each_safe(9), llist_for_each_entry(9), llist_for_each_entry_safe(9), llist_empty(9), llist_add_batch(9), llist_add(9), llist_del_all(9), llist_del_first_init(9) π
cute little sign-off π source/version: ./include/linux β’ date: October 2026 β’ manual: Kernel API Manual β’ page: member_address_is_nonnull(9) β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms