Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-sessiond / clear.cpp
index 1239c5f2467a7db22537de7eb1f4fd751baefe0f..04f2a368e44252152dba51c3ed868227e38df9cf 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/utils.h>
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/utils.hpp>
 
-#include "clear.h"
-#include "session.h"
-#include "ust-app.h"
-#include "kernel.h"
-#include "cmd.h"
+#include "clear.hpp"
+#include "session.hpp"
+#include "ust-app.hpp"
+#include "kernel.hpp"
+#include "cmd.hpp"
 
 struct cmd_clear_session_reply_context {
        int reply_sock_fd;
@@ -38,6 +38,7 @@ void cmd_clear_session_reply(const struct ltt_session *session,
                .pid = UINT32_MAX,
                .cmd_header_size = 0,
                .data_size = 0,
+               .fd_count = 0,
        };
 
        DBG("End of clear command: replying to client");
@@ -66,7 +67,7 @@ int cmd_clear_session(struct ltt_session *session, int *sock_fd)
        usess = session->ust_session;
 
        if (sock_fd) {
-               reply_context = (cmd_clear_session_reply_context *) zmalloc(sizeof(*reply_context));
+               reply_context = zmalloc<cmd_clear_session_reply_context>();
                if (!reply_context) {
                        ret = LTTNG_ERR_NOMEM;
                        goto end;
This page took 0.024462 seconds and 4 git commands to generate.