list.h: add container_of_safe macro
authorFelix Fietkau <nbd@nbd.name>
Fri, 29 Apr 2022 10:57:25 +0000 (12:57 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 29 Apr 2022 10:57:52 +0000 (12:57 +0200)
commit45210ce14136d9410d7139fba816c4465b4c7af5
tree0d11b2b03e1b06aecbf0305ccf56f92d5fead652
parentf2d6752901f2f2d8612fb43e10061570c9198af1
list.h: add container_of_safe macro

It works like container_of, except that it also deals with NULL pointers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
list.h