Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread.cpp
index 867fc7c044c679d658c331c3c94420bd8b1bf2e2..cd95e68858f58d68521c29e2d752a15f088430dc 100644 (file)
@@ -7,30 +7,30 @@
 
 #define _LGPL_SOURCE
 #include <lttng/trigger/trigger.h>
-#include <lttng/notification/channel-internal.h>
-#include <lttng/notification/notification-internal.h>
-#include <lttng/condition/condition-internal.h>
-#include <lttng/condition/buffer-usage-internal.h>
-#include <common/error.h>
-#include <common/config/session-config.h>
-#include <common/defaults.h>
-#include <common/utils.h>
-#include <common/align.h>
-#include <common/time.h>
+#include <lttng/notification/channel-internal.hpp>
+#include <lttng/notification/notification-internal.hpp>
+#include <lttng/condition/condition-internal.hpp>
+#include <lttng/condition/buffer-usage-internal.hpp>
+#include <common/error.hpp>
+#include <common/config/session-config.hpp>
+#include <common/defaults.hpp>
+#include <common/utils.hpp>
+#include <common/align.hpp>
+#include <common/time.hpp>
 #include <sys/stat.h>
 #include <time.h>
 #include <signal.h>
 
-#include "notification-thread.h"
-#include "notification-thread-events.h"
-#include "notification-thread-commands.h"
-#include "lttng-sessiond.h"
-#include "health-sessiond.h"
-#include "thread.h"
-#include "testpoint.h"
+#include "notification-thread.hpp"
+#include "notification-thread-events.hpp"
+#include "notification-thread-commands.hpp"
+#include "lttng-sessiond.hpp"
+#include "health-sessiond.hpp"
+#include "thread.hpp"
+#include "testpoint.hpp"
 
-#include "kernel.h"
-#include <common/kernel-ctl/kernel-ctl.h>
+#include "kernel.hpp"
+#include <common/kernel-ctl/kernel-ctl.hpp>
 
 #include <urcu.h>
 #include <urcu/list.h>
@@ -94,7 +94,7 @@ struct notification_thread_handle *notification_thread_handle_create(
        struct notification_thread_handle *handle;
        struct lttng_pipe *event_pipe = NULL;
 
-       handle = (notification_thread_handle *) zmalloc(sizeof(*handle));
+       handle = zmalloc<notification_thread_handle>();
        if (!handle) {
                goto end;
        }
@@ -162,7 +162,7 @@ char *get_notification_channel_sock_path(void)
        bool is_root = !getuid();
        char *sock_path;
 
-       sock_path = (char *) zmalloc(LTTNG_PATH_MAX);
+       sock_path = calloc<char>(LTTNG_PATH_MAX);
        if (!sock_path) {
                goto error;
        }
This page took 0.031764 seconds and 4 git commands to generate.