Fix: agent port file is o+w when launching as root
[lttng-tools.git] / src / bin / lttng-sessiond / manage-kernel.cpp
index a5d21b0fe52ac10267b154671f55a8eadd4836d5..8d2795466bb32400beda37fd2757aa1b94cb5441 100644 (file)
 #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.023069 seconds and 4 git commands to generate.