Rename C++ header files to .hpp
[lttng-tools.git] / src / common / event.cpp
index 7946d320975a08cdf54bc9bbd0d9a370f4e37687..358d058411cf5ce862ff44815b59f52ff5aa4a0d 100644 (file)
@@ -5,22 +5,20 @@
  *
  */
 
-#include "common/compat/string.h"
-#include "common/macros.h"
-#include "lttng/lttng-error.h"
-#include <assert.h>
-#include <common/buffer-view.h>
-#include <common/dynamic-array.h>
-#include <common/dynamic-buffer.h>
-#include <common/error.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/align.h>
+#include <common/align.hpp>
+#include <common/buffer-view.hpp>
+#include <common/compat/string.hpp>
+#include <common/dynamic-array.hpp>
+#include <common/dynamic-buffer.hpp>
+#include <common/error.hpp>
+#include <common/macros.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+
 #include <lttng/constant.h>
-#include <lttng/event-internal.h>
+#include <lttng/event-internal.hpp>
 #include <lttng/event.h>
-#include <lttng/userspace-probe-internal.h>
-#include <stdint.h>
-#include <string.h>
+#include <lttng/lttng-error.h>
+#include <lttng/userspace-probe-internal.hpp>
 
 struct event_list_element {
        struct lttng_event *event;
@@ -319,8 +317,8 @@ static ssize_t lttng_event_exclusions_create_from_payload(
                        goto end;
                }
 
-               ret = lttng_strncpy(local_exclusions->names[i], string,
-                               sizeof(local_exclusions->names[i]));
+               ret = lttng_strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(local_exclusions, i), string,
+                               sizeof(LTTNG_EVENT_EXCLUSION_NAME_AT(local_exclusions, i)));
                if (ret) {
                        ret = -1;
                        goto end;
@@ -1041,7 +1039,8 @@ static ssize_t lttng_event_context_perf_counter_populate_from_payload(
                        goto end;
                }
 
-               ret = lttng_strncpy(event_ctx->u.perf_counter.name, name, name_len);
+               ret = lttng_strncpy(event_ctx->u.perf_counter.name, name,
+                               sizeof(event_ctx->u.perf_counter.name));
                if (ret) {
                        consumed = -1;
                        goto end;
This page took 0.024689 seconds and 4 git commands to generate.