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 <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2019-07-03 20:29:11 -04:00 committed by Alberto Escolar
commit 91d057f146

View file

@ -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 = \
{ \