rculfhash: Use caa_container_of_check_null in cds_lfht_entry
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 3 Jul 2023 15:20:27 +0000 (11:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 3 Jul 2023 15:32:28 +0000 (11:32 -0400)
Use caa_container_of_check_null in cds_lfht_entry to allow removing
caa_unqual_scalar_typeof, which requires C11.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ifd8b05e666b8f1618a823b96a934a2357edb6b36

include/urcu/rculfhash.h

index 284dab03041a30a96246bb9ca617abd73e72ecee..56c1b13d31eea723fa46808a2295f45465393bab 100644 (file)
@@ -535,10 +535,7 @@ void cds_lfht_resize(struct cds_lfht *ht, unsigned long new_size);
                        node = cds_lfht_iter_get_node(iter))
 
 #define cds_lfht_entry(ptr, type, member)                              \
-       ({                                                              \
-               caa_unqual_scalar_typeof(ptr) ___ptr = (ptr);           \
-               ___ptr ? caa_container_of(___ptr, type, member) : NULL; \
-       })
+       caa_container_of_check_null(ptr, type, member)
 
 #define cds_lfht_for_each_entry(ht, iter, pos, member)                 \
        for (cds_lfht_first(ht, iter),                                  \
This page took 0.027173 seconds and 4 git commands to generate.