From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:14:18 +0000 (+0000) Subject: sessiond: consumer_socket: use lttng::utils::container_of X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=6fe86373a1012febdcddd41657a412fdb841e54e;p=lttng-tools.git sessiond: consumer_socket: 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: I49b36b3ba7be6f4cacde7f44022db459c97bf950 Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/session.cpp b/src/bin/lttng-sessiond/session.cpp index f60415841..69c06288b 100644 --- a/src/bin/lttng-sessiond/session.cpp +++ b/src/bin/lttng-sessiond/session.cpp @@ -884,7 +884,6 @@ end: static enum lttng_error_code session_kernel_open_packets(const ltt_session::locked_ref& session) { enum lttng_error_code ret = LTTNG_OK; - struct consumer_socket *socket; struct lttng_ht_iter iter; struct cds_lfht_node *node; struct ltt_kernel_channel *chan; @@ -893,7 +892,7 @@ static enum lttng_error_code session_kernel_open_packets(const ltt_session::lock cds_lfht_first(session->kernel_session->consumer->socks->ht, &iter.iter); node = cds_lfht_iter_get_node(&iter.iter); - socket = caa_container_of(node, typeof(*socket), node.node); + auto *socket = lttng_ht_node_container_of(node, &consumer_socket::node); cds_list_for_each_entry (chan, &session->kernel_session->channel_list.head, list) { int open_ret;