From: Mathieu Desnoyers Date: Mon, 3 Jul 2023 15:17:04 +0000 (-0400) Subject: compiler.h: Introduce caa_container_of_check_null X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=4b3a7ebd5597b5e241c39110eb426f7832066308;hp=4b3a7ebd5597b5e241c39110eb426f7832066308;p=urcu.git compiler.h: Introduce caa_container_of_check_null The approach taken by caa_unqual_scalar_typeof requires use of _Generic which requires full C11 support. Currently liburcu supports C99. Therefore, this approach is not appropriate for now. Instead, introduce caa_container_of_check_null which returns NULL if the ptr is NULL before offsetting by the member offset. Signed-off-by: Mathieu Desnoyers Change-Id: I0ac1cacc67d83bd3dad6fb6cd2e6595190735441 ---