From bdb289988a88fd61c2bbccb187465b5ba6445f7e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 11 Jan 2000 16:41:57 +0000 Subject: Patch from Emmanuel Raguet to correct macro expansion. These macros were modified to correct warnings and obviously needed more parentheses to expand correctly. --- c/src/libchip/network/dec21140.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'c/src/libchip') diff --git a/c/src/libchip/network/dec21140.c b/c/src/libchip/network/dec21140.c index 296c0744a1..487ffdff43 100644 --- a/c/src/libchip/network/dec21140.c +++ b/c/src/libchip/network/dec21140.c @@ -169,12 +169,12 @@ struct MD { #define START_TRANSMIT_EVENT RTEMS_EVENT_2 #if defined(__PPC) -#define phys_to_bus(address) ((unsigned int)(address) + PREP_PCI_DRAM_OFFSET) -#define bus_to_phys(address) ((unsigned int)(address) - PREP_PCI_DRAM_OFFSET) +#define phys_to_bus(address) ((unsigned int)((address)) + PREP_PCI_DRAM_OFFSET) +#define bus_to_phys(address) ((unsigned int)((address)) - PREP_PCI_DRAM_OFFSET) #define CPU_CACHE_ALIGNMENT_FOR_BUFFER PPC_CACHE_ALIGNMENT #else -#define phys_to_bus(address) (unsigned int) address -#define bus_to_phys(address) (unsigned int) address +#define phys_to_bus(address) ((unsigned int) ((address))) +#define bus_to_phys(address) ((unsigned int) ((address))) #define delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 ) #define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE -- cgit v1.2.3