From 7854ee499aaf19e0849a46e91caaa7408110bc89 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Thu, 29 Mar 2012 11:22:56 +0100 Subject: [PATCH] Wrapped cc2x30 SOFT_RESET() macro inside do {...} while(0) --- cpu/cc2430/8051def.h | 4 ++-- cpu/cc253x/8051def.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/cc2430/8051def.h b/cpu/cc2430/8051def.h index 32528d30f..a7327ed92 100644 --- a/cpu/cc2430/8051def.h +++ b/cpu/cc2430/8051def.h @@ -75,8 +75,8 @@ typedef unsigned short clock_time_t; __endasm; \ } -/* Macro for a soft reset. In many respects better than H/W reboot via W/D */ -#define SOFT_RESET() {((void (__code *) (void)) 0x0000) ();} +/* Macro for a soft reset. */ +#define SOFT_RESET() do {((void (__code *) (void)) 0x0000) ();} while(0) /* We don't provide architecture-specific checksum calculations */ #define UIP_ARCH_ADD32 0 diff --git a/cpu/cc253x/8051def.h b/cpu/cc253x/8051def.h index 21a4ffcf7..7ac0b84ef 100644 --- a/cpu/cc253x/8051def.h +++ b/cpu/cc253x/8051def.h @@ -59,8 +59,8 @@ typedef unsigned short uip_stats_t; #define DISABLE_INTERRUPTS() do {EA = 0;} while(0) #define ENABLE_INTERRUPTS() do {EA = 1;} while(0) -/* Macro for a soft reset. In many respects better than H/W reboot via W/D */ -#define SOFT_RESET() {((void (__code *) (void)) 0x0000) ();} +/* Macro for a soft reset. */ +#define SOFT_RESET() do {((void (__code *) (void)) 0x0000) ();} while(0) /* We don't provide architecture-specific checksum calculations */ #define UIP_ARCH_ADD32 0