diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-11-01 09:20:34 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-11-01 09:20:34 +0000 |
commit | a5c6d5b45b896d03178a8c359133d0a1b0e7bd09 (patch) | |
tree | c5e2d0d2f9bf49f7d6bd7e6defe166dd7f5d1511 /os/hal/include | |
parent | a53d698bb356e821112d11c8c1f0a43f77f826cc (diff) | |
download | ChibiOS-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')
-rw-r--r-- | os/hal/include/spi.h | 12 |
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); \
} \
}
|