*
*/
-#include "metadata-bucket.h"
+#include "metadata-bucket.hpp"
-#include <common/buffer-view.h>
-#include <common/consumer/consumer.h>
-#include <common/dynamic-buffer.h>
-#include <common/macros.h>
-#include <common/error.h>
+#include <common/buffer-view.hpp>
+#include <common/consumer/consumer.hpp>
+#include <common/dynamic-buffer.hpp>
+#include <common/macros.hpp>
+#include <common/error.hpp>
struct metadata_bucket {
struct lttng_dynamic_buffer content;
struct metadata_bucket *metadata_bucket_create(
metadata_bucket_flush_cb flush, void *data)
{
- struct metadata_bucket *bucket;
-
- bucket = (metadata_bucket *) zmalloc(sizeof(typeof(*bucket)));
+ metadata_bucket *bucket = zmalloc<metadata_bucket>();
if (!bucket) {
PERROR("Failed to allocate buffer bucket");
goto end;