From a5c6d5b45b896d03178a8c359133d0a1b0e7bd09 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 1 Nov 2010 09:20:34 +0000 Subject: Added safety () around a macro parameter. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2315 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/spi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/hal') diff --git a/os/hal/include/spi.h b/os/hal/include/spi.h index 92fccec61..d7a5c6ecd 100644 --- a/os/hal/include/spi.h +++ b/os/hal/include/spi.h @@ -257,14 +257,14 @@ typedef enum { * @notapi */ #define _spi_isr_code(spip) { \ - if (spip->spd_config->spc_endcb) { \ - spip->spd_state = SPI_COMPLETE; \ - spip->spd_config->spc_endcb(spip); \ - if (spip->spd_state == SPI_COMPLETE) \ - spip->spd_state = SPI_READY; \ + if ((spip)->spd_config->spc_endcb) { \ + (spip)->spd_state = SPI_COMPLETE; \ + (spip)->spd_config->spc_endcb(spip); \ + if ((spip)->spd_state == SPI_COMPLETE) \ + (spip)->spd_state = SPI_READY; \ } \ else { \ - spip->spd_state = SPI_READY; \ + (spip)->spd_state = SPI_READY; \ _spi_wakeup(spip); \ } \ } -- cgit v1.2.3