From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:58:33 +0000 (+0000) Subject: sessiond: ust_app_event: use lttng::utils::container_of X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=c46ebf9f47d4d06403b2688596f7124229a53800;p=lttng-tools.git sessiond: ust_app_event: use lttng::utils::container_of 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: Ica13ae34db7c0fd04118d0e80c7ae71b77f66ad6 Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/ust-app.cpp b/src/bin/lttng-sessiond/ust-app.cpp index c28f568ae..108812772 100644 --- a/src/bin/lttng-sessiond/ust-app.cpp +++ b/src/bin/lttng-sessiond/ust-app.cpp @@ -179,14 +179,11 @@ static void copy_channel_attr_to_ustctl(struct lttng_ust_ctl_consumer_channel_at */ static int ht_match_ust_app_event(struct cds_lfht_node *node, const void *_key) { - struct ust_app_event *event; - const struct ust_app_ht_key *key; - LTTNG_ASSERT(node); LTTNG_ASSERT(_key); - event = caa_container_of(node, struct ust_app_event, node.node); - key = (ust_app_ht_key *) _key; + auto *event = lttng_ht_node_container_of(node, &ust_app_event::node); + const auto *key = (ust_app_ht_key *) _key; /* Match the 4 elements of the key: name, filter, loglevel, exclusions */