fix: relayd: unaligned access in trace_chunk_registry_ht_key_hash
[lttng-tools.git] / src / bin / lttng-relayd / cmd-2-2.cpp
index bd18714af840626d0291382205a33bd6a4054563..dcdd1bac14cb9f14057fb0fb8a8119cad6fa439b 100644 (file)
@@ -9,33 +9,36 @@
 
 #define _LGPL_SOURCE
 
-#include <common/common.h>
-#include <common/sessiond-comm/relayd.h>
+#include "cmd-2-1.hpp"
+#include "cmd-2-2.hpp"
+#include "utils.hpp"
 
-#include <common/compat/endian.h>
-#include <common/compat/string.h>
-#include <lttng/constant.h>
+#include <common/common.hpp>
+#include <common/compat/endian.hpp>
+#include <common/compat/string.hpp>
+#include <common/sessiond-comm/relayd.hpp>
 
-#include "cmd-2-2.h"
-#include "cmd-2-1.h"
-#include "utils.h"
+#include <lttng/constant.h>
 
 /*
  * cmd_recv_stream_2_2 allocates path_name and channel_name.
  */
 int cmd_recv_stream_2_2(const struct lttng_buffer_view *payload,
-               char **ret_path_name, char **ret_channel_name,
-               uint64_t *tracefile_size, uint64_t *tracefile_count)
+                       char **ret_path_name,
+                       char **ret_channel_name,
+                       uint64_t *tracefile_size,
+                       uint64_t *tracefile_count)
 {
        int ret;
        struct lttcomm_relayd_add_stream_2_2 stream_info;
-       char *path_name = NULL;
-       char *channel_name = NULL;
+       char *path_name = nullptr;
+       char *channel_name = nullptr;
        size_t len;
 
        if (payload->size < sizeof(stream_info)) {
                ERR("Unexpected payload size in \"cmd_recv_stream_2_2\": expected >= %zu bytes, got %zu bytes",
-                               sizeof(stream_info), payload->size);
+                   sizeof(stream_info),
+                   payload->size);
                ret = -1;
                goto error;
        }
This page took 0.023643 seconds and 4 git commands to generate.