X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevent.cpp;h=358d058411cf5ce862ff44815b59f52ff5aa4a0d;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hp=7946d320975a08cdf54bc9bbd0d9a370f4e37687;hpb=2d6df81a3d233d7aaf34b874087555e72b105877;p=lttng-tools.git diff --git a/src/common/event.cpp b/src/common/event.cpp index 7946d3209..358d05841 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -5,22 +5,20 @@ * */ -#include "common/compat/string.h" -#include "common/macros.h" -#include "lttng/lttng-error.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include + #include -#include +#include #include -#include -#include -#include +#include +#include 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;