From: Jérémie Galarneau Date: Wed, 31 Jul 2024 01:06:11 +0000 (+0000) Subject: sessiond: agent-thread.cpp: iterate on list using list_iteration_adapter X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=823d5ba60f95d5fae053c3f2f57c58871bde8fe9;p=lttng-tools.git sessiond: agent-thread.cpp: iterate on list using list_iteration_adapter Change-Id: Ibd02f3e2c8d91fc8aa09097be2ea7b563001b1da Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/agent-thread.cpp b/src/bin/lttng-sessiond/agent-thread.cpp index fa98f5f0b..82c74b10a 100644 --- a/src/bin/lttng-sessiond/agent-thread.cpp +++ b/src/bin/lttng-sessiond/agent-thread.cpp @@ -59,13 +59,13 @@ const char *default_reg_uri = "tcp://" DEFAULT_NETWORK_VIEWER_BIND_ADDRESS; */ static void update_agent_app(const struct agent_app *app) { - struct ltt_session *session, *stmp; struct ltt_session_list *list; list = session_get_list(); LTTNG_ASSERT(list); - cds_list_for_each_entry_safe (session, stmp, &list->head, list) { + for (auto *session : + lttng::urcu::list_iteration_adapter(list->head)) { if (!session_get(session)) { continue; }