Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / consumer / metadata-bucket.cpp
index 160185def7b77fe5e05ff5434c486eae9c405092..f9c35e22ce4c4d3e25521c53e02d91dc9694c1eb 100644 (file)
@@ -5,13 +5,13 @@
  *
  */
 
-#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;
@@ -25,9 +25,7 @@ struct metadata_bucket {
 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;
This page took 0.0239 seconds and 4 git commands to generate.