Skip to content
Permalink
Browse files

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>
  • Loading branch information...
Nicolas Pitre authored and aescolar committed Jul 4, 2019
1 parent 2dc6eea commit 91d057f1464a6cc11e191edb67ff6d6907542e74
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 = \
{ \

0 comments on commit 91d057f

Please sign in to comment.
You can’t perform that action at this time.