From: Mathieu Desnoyers Date: Thu, 21 Sep 2023 06:19:45 +0000 (+0100) Subject: Use SIDE_PTR_INIT in side_type_raw_string X-Git-Url: http://git.efficios.com/?p=libside.git;a=commitdiff_plain;h=d1251f444f485099c540d5f08e11b0321a0d0771 Use SIDE_PTR_INIT in side_type_raw_string Signed-off-by: Mathieu Desnoyers --- diff --git a/include/side/trace.h b/include/side/trace.h index ac95456..6cb0185 100644 --- a/include/side/trace.h +++ b/include/side/trace.h @@ -678,9 +678,7 @@ struct side_event_description { #define side_attr(_key, _value) \ { \ .key = { \ - .p = { \ - .v = (uintptr_t) (_key), \ - }, \ + .p = SIDE_PTR_INIT(_key), \ .unit_size = sizeof(uint8_t), \ .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \ }, \ @@ -710,9 +708,7 @@ struct side_event_description { .type = SIDE_ATTR_TYPE_STRING, \ .u = { \ .string_value = { \ - .p = { \ - .v = (uintptr_t) (_val), \ - }, \ + .p = SIDE_PTR_INIT(_val), \ .unit_size = _unit_size, \ .byte_order = _byte_order, \ }, \ @@ -741,9 +737,7 @@ struct side_event_description { .range_begin = _begin, \ .range_end = _end, \ .label = { \ - .p = { \ - .v = (uintptr_t) (_label), \ - }, \ + .p = SIDE_PTR_INIT(_label), \ .unit_size = sizeof(uint8_t), \ .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \ }, \ @@ -754,9 +748,7 @@ struct side_event_description { .range_begin = _value, \ .range_end = _value, \ .label = { \ - .p = { \ - .v = (uintptr_t) (_label), \ - }, \ + .p = SIDE_PTR_INIT(_label), \ .unit_size = sizeof(uint8_t), \ .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \ }, \ @@ -778,9 +770,7 @@ struct side_event_description { .range_begin = _begin, \ .range_end = _end, \ .label = { \ - .p = { \ - .v = (uintptr_t) (_label), \ - }, \ + .p = SIDE_PTR_INIT(_label), \ .unit_size = sizeof(uint8_t), \ .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \ }, \ @@ -791,9 +781,7 @@ struct side_event_description { .range_begin = _value, \ .range_end = _value, \ .label = { \ - .p = { \ - .v = (uintptr_t) (_label), \ - }, \ + .p = SIDE_PTR_INIT(_label), \ .unit_size = sizeof(uint8_t), \ .byte_order = SIDE_TYPE_BYTE_ORDER_HOST, \ }, \