Put parentheses around macro argument.

It might be too paranoid but makes it safe to deal with operators
with lower priorities than '+', '<<' for example.
This commit is contained in:
Wenyang Duan 2023-09-25 14:32:56 -07:00 committed by Frans Kaashoek
parent 92e60dd833
commit 343d1ab482

View file

@ -13,7 +13,7 @@
// the UART control registers are memory-mapped
// at address UART0. this macro returns the
// address of one of the registers.
#define Reg(reg) ((volatile unsigned char *)(UART0 + reg))
#define Reg(reg) ((volatile unsigned char *)(UART0 + (reg)))
// the UART control registers.
// some have different meanings for