Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-relayd / tracefile-array.cpp
index 05012b642cc40f6f6c913806e808b56d488e45d5..73a2887941517275c4a860e89f71dab92585f3c8 100644 (file)
@@ -6,22 +6,22 @@
  */
 
 #define _LGPL_SOURCE
-#include <common/common.h>
-#include <common/utils.h>
-#include <common/defaults.h>
+#include <common/common.hpp>
+#include <common/utils.hpp>
+#include <common/defaults.hpp>
 
-#include "tracefile-array.h"
+#include "tracefile-array.hpp"
 
 struct tracefile_array *tracefile_array_create(size_t count)
 {
        struct tracefile_array *tfa = NULL;
        int i;
 
-       tfa = (tracefile_array *) zmalloc(sizeof(*tfa));
+       tfa = zmalloc<tracefile_array>();
        if (!tfa) {
                goto error;
        }
-       tfa->tf = (tracefile *) zmalloc(sizeof(*tfa->tf) * count);
+       tfa->tf = calloc<tracefile>(count);
        if (!tfa->tf) {
                goto error;
        }
This page took 0.02441 seconds and 4 git commands to generate.