Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / consumer / consumer-metadata-cache.cpp
index fdda6be8b5f4027a94cb14597a0a8f2aa855764f..274ecf48fa71275ee28803f850049b7ab882f763 100644 (file)
 #include <unistd.h>
 #include <inttypes.h>
 
-#include <common/common.h>
-#include <common/utils.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/ust-consumer/ust-consumer.h>
-#include <common/consumer/consumer.h>
+#include <common/common.hpp>
+#include <common/utils.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/ust-consumer/ust-consumer.hpp>
+#include <common/consumer/consumer.hpp>
 
-#include "consumer-metadata-cache.h"
+#include "consumer-metadata-cache.hpp"
 
 enum metadata_cache_update_version_status {
        METADATA_CACHE_UPDATE_STATUS_VERSION_UPDATED,
@@ -129,8 +129,7 @@ int consumer_metadata_cache_allocate(struct lttng_consumer_channel *channel)
 
        LTTNG_ASSERT(channel);
 
-       channel->metadata_cache = (consumer_metadata_cache *) zmalloc(
-                       sizeof(struct consumer_metadata_cache));
+       channel->metadata_cache = zmalloc<consumer_metadata_cache>();
        if (!channel->metadata_cache) {
                PERROR("zmalloc metadata cache struct");
                ret = -1;
This page took 0.023907 seconds and 4 git commands to generate.