Skip to content
Commit ec3aece9 authored by Martí Bolívar's avatar Martí Bolívar Committed by Anas Nashif
Browse files

drivers: spi: avoid undefined behavior



Void pointer arithmetic is undefined behavior (UB).

It's OK for struct spi_buf to contain a void *, because those values
are only ever stored, read, and compared. However, pointer arithmetic
is done on the tx_buf and rx_buf fields in struct spi_context, so
those need to be u8_t * to avoid UB.

Signed-off-by: default avatarMarti Bolivar <marti.bolivar@linaro.org>
parent db91163e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment