*/
#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;
}