From: Mathieu Desnoyers Date: Tue, 16 Mar 2021 20:17:26 +0000 (-0400) Subject: Cleanup: public type macros coding style X-Git-Tag: v2.13.0-rc1~271 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=68f882666d2a83f061d702d154983a61987e25e2;p=lttng-ust.git Cleanup: public type macros coding style Signed-off-by: Mathieu Desnoyers Change-Id: I6732b20d1e2975f2a00678e00dc84c4ac6f7be67 --- diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 059589f3..0e9d4875 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -105,19 +105,17 @@ struct lttng_ust_enum_entry { /* End of base ABI. Fields below should be used after checking struct_size. */ }; -#define __type_integer(_type, _byte_order, _base, _encoding) \ - { \ - .atype = atype_integer, \ - .u = \ - { \ - .integer = \ - { \ - .size = sizeof(_type) * CHAR_BIT, \ - .alignment = lttng_alignof(_type) * CHAR_BIT, \ - .signedness = lttng_is_signed_type(_type), \ - .reverse_byte_order = _byte_order != BYTE_ORDER, \ - .base = _base, \ - .encoding = lttng_encode_##_encoding, \ +#define __type_integer(_type, _byte_order, _base, _encoding) \ + { \ + .atype = atype_integer, \ + .u = { \ + .integer = { \ + .size = sizeof(_type) * CHAR_BIT, \ + .alignment = lttng_alignof(_type) * CHAR_BIT, \ + .signedness = lttng_is_signed_type(_type), \ + .reverse_byte_order = _byte_order != BYTE_ORDER, \ + .base = _base, \ + .encoding = lttng_encode_##_encoding, \ } \ }, \ } \ @@ -142,21 +140,19 @@ struct lttng_integer_type { : (sizeof(_type) == sizeof(double) ? DBL_MANT_DIG \ : 0)) -#define __type_float(_type) \ - { \ - .atype = atype_float, \ - .u = \ - { \ - ._float = \ - { \ - .exp_dig = sizeof(_type) * CHAR_BIT \ - - _float_mant_dig(_type), \ - .mant_dig = _float_mant_dig(_type), \ - .alignment = lttng_alignof(_type) * CHAR_BIT, \ - .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER, \ - } \ - } \ - } \ +#define __type_float(_type) \ + { \ + .atype = atype_float, \ + .u = { \ + ._float = { \ + .exp_dig = sizeof(_type) * CHAR_BIT \ + - _float_mant_dig(_type), \ + .mant_dig = _float_mant_dig(_type), \ + .alignment = lttng_alignof(_type) * CHAR_BIT, \ + .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER, \ + } \ + } \ + } \ #define LTTNG_UST_FLOAT_TYPE_PADDING 24 struct lttng_float_type {