Fix: sessiond: report client list allocation failure as a fatal error
[lttng-tools.git] / src / bin / lttng-sessiond / health.cpp
index 53b9ee01f0e362171dcee85fcb888f26da49c8a5..0735907a26ad3ae67d9fc26d6f543e8f7f0c98fa 100644 (file)
@@ -6,21 +6,23 @@
  *
  */
 
-#include "lttng-sessiond.h"
-#include "health-sessiond.h"
-#include <common/macros.h>
-#include <common/error.h>
-#include <common/utils.h>
-#include <common/pipe.h>
+#include "lttng-sessiond.hpp"
+#include "health-sessiond.hpp"
+#include <common/macros.hpp>
+#include <common/error.hpp>
+#include <common/utils.hpp>
+#include <common/pipe.hpp>
 #include <inttypes.h>
 #include <sys/stat.h>
-#include "utils.h"
-#include "thread.h"
+#include "utils.hpp"
+#include "thread.hpp"
 
+namespace {
 struct thread_notifiers {
        struct lttng_pipe *quit_pipe;
        sem_t ready;
 };
+} /* namespace */
 
 static
 void mark_thread_as_ready(struct thread_notifiers *notifiers)
@@ -255,7 +257,7 @@ bool launch_health_management_thread(void)
        struct thread_notifiers *notifiers;
        struct lttng_thread *thread;
 
-       notifiers = (thread_notifiers *) zmalloc(sizeof(*notifiers));
+       notifiers = zmalloc<thread_notifiers>();
        if (!notifiers) {
                goto error_alloc;
        }
This page took 0.0245 seconds and 4 git commands to generate.