Fix: sessiond: report client list allocation failure as a fatal error
[lttng-tools.git] / src / bin / lttng-sessiond / manage-kernel.cpp
index a789a0b29573ab830264d36799d78a8bcf1bc3f2..8d2795466bb32400beda37fd2757aa1b94cb5441 100644 (file)
@@ -7,21 +7,23 @@
  *
  */
 
-#include <common/pipe.h>
-#include <common/utils.h>
-
-#include "manage-kernel.h"
-#include "testpoint.h"
-#include "health-sessiond.h"
-#include "utils.h"
-#include "thread.h"
-#include "kernel.h"
-#include "kernel-consumer.h"
-
+#include <common/pipe.hpp>
+#include <common/utils.hpp>
+
+#include "manage-kernel.hpp"
+#include "testpoint.hpp"
+#include "health-sessiond.hpp"
+#include "utils.hpp"
+#include "thread.hpp"
+#include "kernel.hpp"
+#include "kernel-consumer.hpp"
+
+namespace {
 struct thread_notifiers {
        struct lttng_pipe *quit_pipe;
        int kernel_poll_pipe_read_fd;
 };
+} /* namespace */
 
 /*
  * Update the kernel poll set of all channel fd available over all tracing
@@ -332,7 +334,7 @@ bool launch_kernel_management_thread(int kernel_poll_pipe_read_fd)
        struct thread_notifiers *notifiers = NULL;
        struct lttng_thread *thread;
 
-       notifiers = (thread_notifiers *) zmalloc(sizeof(*notifiers));
+       notifiers = zmalloc<thread_notifiers>();
        if (!notifiers) {
                goto error_alloc;
        }
This page took 0.022947 seconds and 4 git commands to generate.