aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/spi.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-01 09:20:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-01 09:20:34 +0000
commita5c6d5b45b896d03178a8c359133d0a1b0e7bd09 (patch)
treec5e2d0d2f9bf49f7d6bd7e6defe166dd7f5d1511 /os/hal/include/spi.h
parenta53d698bb356e821112d11c8c1f0a43f77f826cc (diff)
downloadChibiOS-a5c6d5b45b896d03178a8c359133d0a1b0e7bd09.tar.gz
ChibiOS-a5c6d5b45b896d03178a8c359133d0a1b0e7bd09.tar.bz2
ChibiOS-a5c6d5b45b896d03178a8c359133d0a1b0e7bd09.zip
Added safety () around a macro parameter.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2315 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/spi.h')
-rw-r--r--os/hal/include/spi.h12
1 files changed, 6 insertions, 6 deletions
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); \
} \
}