#include <string.h>
#include <urcu/uatomic.h>
-#include <common/defaults.h>
+#include <common/defaults.hpp>
-#include "snapshot.h"
-#include "utils.h"
+#include "snapshot.hpp"
+#include "utils.hpp"
/*
* Return the atomically incremented value of next_output_id.
struct snapshot_output *snapshot_output_alloc(void)
{
- return (snapshot_output *) zmalloc(sizeof(struct snapshot_output));
+ return zmalloc<snapshot_output>();
}
/*
DBG3("Snapshot output not found with id %" PRId32, id);
goto error;
}
- output = caa_container_of(node, struct snapshot_output, node);
+ output = lttng::utils::container_of(node, &snapshot_output::node);
error:
return output;