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:
@@ -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 \
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user