X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsave.cpp;h=5db70faef47e98f0c865e65e69916365beab3a89;hb=63c3462c3dbd028a08f7a9b504c45e178371248d;hp=2055e867de5eac86496a7cd599c0aee488510026;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/save.cpp b/src/bin/lttng-sessiond/save.cpp index 2055e867d..5db70faef 100644 --- a/src/bin/lttng-sessiond/save.cpp +++ b/src/bin/lttng-sessiond/save.cpp @@ -11,19 +11,19 @@ #include #include -#include -#include -#include -#include -#include -#include - -#include "kernel.h" -#include "save.h" -#include "session.h" -#include "lttng-syscall.h" -#include "trace-ust.h" -#include "agent.h" +#include +#include +#include +#include +#include +#include + +#include "kernel.hpp" +#include "save.hpp" +#include "session.hpp" +#include "lttng-syscall.hpp" +#include "trace-ust.hpp" +#include "agent.hpp" /* Return LTTNG_OK on success else a LTTNG_ERR* code. */ static @@ -199,7 +199,7 @@ int save_ust_channel_attributes(struct config_writer *writer, * Fetch the monitor timer which is located in the parent of * lttng_ust_channel_attr */ - channel = caa_container_of(attr, struct ltt_ust_channel, attr); + channel = lttng::utils::container_of(attr, <t_ust_channel::attr); ret = config_writer_write_element_unsigned_int(writer, config_element_monitor_timer_interval, channel->monitor_timer_interval); @@ -1155,7 +1155,7 @@ int save_ust_events(struct config_writer *writer, rcu_read_lock(); cds_lfht_for_each_entry(events->ht, &iter.iter, node, node) { - event = caa_container_of(node, struct ltt_ust_event, node); + event = lttng::utils::container_of(node, <t_ust_event::node); if (event->internal) { /* Internal events must not be exposed to clients */ @@ -1243,7 +1243,7 @@ int save_agent_events(struct config_writer *writer, struct ltt_ust_event fake_event; memset(&fake_event, 0, sizeof(fake_event)); - agent_event = caa_container_of(node, struct agent_event, node); + agent_event = lttng::utils::container_of(node, &agent_event::node); /* * Initialize a fake ust event to reuse the same serialization @@ -2135,7 +2135,7 @@ int save_ust_domain(struct config_writer *writer, rcu_read_lock(); cds_lfht_for_each_entry(session->ust_session->domain_global.channels->ht, &iter.iter, node, node) { - ust_chan = caa_container_of(node, struct ltt_ust_channel, node); + ust_chan = lttng::utils::container_of(node, <t_ust_channel::node); if (domain == ust_chan->domain) { ret = save_ust_channel(writer, ust_chan, session->ust_session); if (ret != LTTNG_OK) { @@ -2322,7 +2322,7 @@ int save_consumer_output(struct config_writer *writer, { char *uri; - uri = (char *) zmalloc(PATH_MAX); + uri = calloc(PATH_MAX); if (!uri) { ret = LTTNG_ERR_NOMEM; goto end;