caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.
Change-Id: I96a42df9c82ad6b520d3b53a6445159bce692120
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
*/
static int ht_match_reg_uid(struct cds_lfht_node *node, const void *_key)
{
- struct buffer_reg_uid *reg;
- const struct buffer_reg_uid *key;
-
LTTNG_ASSERT(node);
LTTNG_ASSERT(_key);
- reg = caa_container_of(node, struct buffer_reg_uid, node.node);
- LTTNG_ASSERT(reg);
- key = (buffer_reg_uid *) _key;
+ auto *reg = lttng_ht_node_container_of(node, &buffer_reg_uid::node);
+ const auto *key = (buffer_reg_uid *) _key;
if (key->session_id != reg->session_id || key->bits_per_long != reg->bits_per_long ||
key->uid != reg->uid) {