sessiond: agent-thread.cpp: iterate on list using list_iteration_adapter
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Jul 2024 01:06:11 +0000 (01:06 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Jul 2024 03:36:52 +0000 (23:36 -0400)
Change-Id: Ibd02f3e2c8d91fc8aa09097be2ea7b563001b1da
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/agent-thread.cpp

index fa98f5f0b001361e381f5de136b3bc6c31779bbd..82c74b10a76e6028728174d33c5711a8dc209f88 100644 (file)
@@ -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<ltt_session, &ltt_session::list>(list->head)) {
                if (!session_get(session)) {
                        continue;
                }
This page took 0.026912 seconds and 4 git commands to generate.