ring_buffer: fix designated initializer order in RING_BUF_DECLARE

Change order of designated initializers for ring_buf struct in the
RING_BUF_DECLARE macro, to match the order in the struct definition.
This fixes compilation when using C++, which requires using the same
order as in the struct definition.
Fixes #45697

Signed-off-by: Jonas Otto <jonas@jonasotto.com>
This commit is contained in:
Jonas Otto
2022-05-16 18:45:15 +02:00
committed by Carles Cufí
parent a0aa8c76d6
commit a36995e2a3

View File

@@ -78,8 +78,8 @@ static inline void ring_buf_internal_reset(struct ring_buf *buf, int32_t value)
RING_BUFFER_SIZE_ASSERT_MSG); \
static uint8_t __noinit _ring_buffer_data_##name[size8]; \
struct ring_buf name = { \
.size = size8, \
.buffer = _ring_buffer_data_##name \
.buffer = _ring_buffer_data_##name, \
.size = size8 \
}
/**