Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-relayd / tracefile-array.cpp
index 8b1b533d5d60e8520344531ff3f3813d36030591..73a2887941517275c4a860e89f71dab92585f3c8 100644 (file)
@@ -17,11 +17,11 @@ 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.027687 seconds and 4 git commands to generate.