Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-sessiond / channel.cpp
index c5b944d617ad704b2b56944ee5c85b8e4027bab8..540fc973405de16ebcc4d3fddf450827e9018f03 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
-#include <common/common.h>
-#include <common/defaults.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-
-#include "channel.h"
-#include "lttng-sessiond.h"
-#include "kernel.h"
-#include "lttng-ust-ctl.h"
-#include "lttng-ust-error.h"
-#include "utils.h"
-#include "ust-app.h"
-#include "agent.h"
+#include <common/common.hpp>
+#include <common/defaults.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+
+#include "channel.hpp"
+#include "lttng-sessiond.hpp"
+#include "kernel.hpp"
+#include "lttng-ust-ctl.hpp"
+#include "lttng-ust-error.hpp"
+#include "utils.hpp"
+#include "ust-app.hpp"
+#include "agent.hpp"
 
 /*
  * Return allocated channel attributes.
@@ -34,13 +34,13 @@ struct lttng_channel *channel_new_default_attr(int dom,
        const char *channel_name = DEFAULT_CHANNEL_NAME;
        struct lttng_channel_extended *extended_attr = NULL;
 
-       chan = (lttng_channel *) zmalloc(sizeof(struct lttng_channel));
+       chan = zmalloc<lttng_channel>();
        if (chan == NULL) {
                PERROR("zmalloc channel init");
                goto error_alloc;
        }
 
-       extended_attr = (lttng_channel_extended *) zmalloc(sizeof(struct lttng_channel_extended));
+       extended_attr = zmalloc<lttng_channel_extended>();
        if (!extended_attr) {
                PERROR("zmalloc channel extended init");
                goto error;
This page took 0.024702 seconds and 4 git commands to generate.