From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:13:11 +0000 (+0000) Subject: sessiond: index_ht_entry: use lttng::utils::container_of X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=abfedd7d907d19d05aa026e2e9de6ec3bda9f286;p=lttng-tools.git sessiond: index_ht_entry: 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: Ic2ed13700b8258b274aef9153ebc9d2a6a3536f3 Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp b/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp index 27d049601..9672fdc6b 100644 --- a/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp +++ b/src/bin/lttng-sessiond/event-notifier-error-accounting.cpp @@ -1248,7 +1248,7 @@ event_notifier_error_accounting_clear(const struct lttng_trigger *trigger) static void free_index_ht_entry(struct rcu_head *head) { - struct index_ht_entry *entry = caa_container_of(head, struct index_ht_entry, rcu_head); + auto *entry = lttng::utils::container_of(head, &index_ht_entry::rcu_head); free(entry); }