Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / bytecode / bytecode.cpp
index 6100892b718554c762a5a398c4431f6cc682bde5..c32f3900b8d4332d32e0a9eb5b771dc40b82fe85 100644 (file)
@@ -5,12 +5,12 @@
  *
  */
 
-#include "bytecode.h"
+#include "bytecode.hpp"
 
 #include <errno.h>
 #include <algorithm>
 
-#include "common/align.h"
+#include "common/align.hpp"
 
 #define INIT_ALLOC_SIZE 4
 
@@ -251,9 +251,8 @@ end:
 struct lttng_bytecode *lttng_bytecode_copy(
                const struct lttng_bytecode *orig_f)
 {
-       struct lttng_bytecode *bytecode = NULL;
-
-       bytecode = (lttng_bytecode *) zmalloc(sizeof(*bytecode) + orig_f->len);
+       lttng_bytecode *bytecode
+               = zmalloc<lttng_bytecode>(sizeof(*bytecode) + orig_f->len);
        if (!bytecode) {
                goto error;
        }
This page took 0.023562 seconds and 4 git commands to generate.