From 91d057f1464a6cc11e191edb67ff6d6907542e74 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Wed, 3 Jul 2019 20:29:11 -0400 Subject: [PATCH] shell_history: align buffer to pointer size The code in shell_history_put() adds padding to new entries so they are pointer aligned. The whole buffer has to be so aligned too. Signed-off-by: Nicolas Pitre --- include/shell/shell_history.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/shell/shell_history.h b/include/shell/shell_history.h index ff9c2a46a6b..67337d50117 100644 --- a/include/shell/shell_history.h +++ b/include/shell/shell_history.h @@ -31,7 +31,7 @@ struct shell_history { * @param _size Memory dedicated for shell history. */ #define SHELL_HISTORY_DEFINE(_name, _size) \ - static u8_t __noinit __aligned(sizeof(u32_t)) \ + static u8_t __noinit __aligned(sizeof(void *)) \ _name##_ring_buf_data[_size]; \ static struct ring_buf _name##_ring_buf = \ { \