Fix: sessiond: report client list allocation failure as a fatal error
[lttng-tools.git] / src / bin / lttng-sessiond / manage-kernel.cpp
index 2ffe60919a08b08f08d51923704e040422630862..8d2795466bb32400beda37fd2757aa1b94cb5441 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 EfficiOS Inc.
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  * Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
@@ -7,21 +7,23 @@
  *
  */
 
-#include <common/pipe.h>
-#include <common/utils.h>
+#include <common/pipe.hpp>
+#include <common/utils.hpp>
 
-#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 "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.02455 seconds and 4 git commands to generate.