]> git.lttng.org Git - lttng-tools.git/commitdiff
sessiond: ust_app_event: use lttng::utils::container_of
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Jul 2024 19:58:33 +0000 (19:58 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 01:26:51 +0000 (01:26 +0000)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.cpp

index c28f568aee1ee3ad13677a21dea7f0d0d321f68a..108812772b0507caa3faaefd1947062209601d40 100644 (file)
@@ -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 */
 
This page took 0.031375 seconds and 4 git commands to generate.