X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Ferror-query.cpp;h=d3831ae81b86bf6c509c42818119fc937394cde2;hb=9a30ba1da4e6d59eb30c6535a9dd04cd599e6fae;hp=b3904104a71d9547fc6906f97f14a596374b64ea;hpb=51cf5d01f6bb3035ee33ee6ef2c0ae9352d64a5f;p=lttng-tools.git diff --git a/src/common/error-query.cpp b/src/common/error-query.cpp index b3904104a..d3831ae81 100644 --- a/src/common/error-query.cpp +++ b/src/common/error-query.cpp @@ -565,9 +565,9 @@ int lttng_error_query_results_serialize( size_t result_index; const size_t result_count = lttng_dynamic_pointer_array_get_count( &results->results); - const struct lttng_error_query_results_comm header = { - .count = (decltype(header.count)) result_count, - }; + struct lttng_error_query_results_comm header; + + header.count = (decltype(header.count)) result_count; /* Header. */ ret = lttng_dynamic_buffer_append(&payload->buffer, &header, sizeof(header)); @@ -772,9 +772,9 @@ int lttng_error_query_serialize(const struct lttng_error_query *query, struct lttng_payload *payload) { int ret; - const struct lttng_error_query_comm header = { - .target_type = (decltype(header.target_type)) query->target_type, - }; + struct lttng_error_query_comm header; + + header.target_type = (decltype(header.target_type)) query->target_type; ret = lttng_dynamic_buffer_append( &payload->buffer, &header, sizeof(header));