Skip to content

Commit

Permalink
bricks/mpconfigport: Fix parentheses around '-' with '&'.
Browse files Browse the repository at this point in the history
In case i is itself an arithmatic operation.
  • Loading branch information
laurensvalk committed Oct 2, 2024
1 parent b460d6d commit db2ecc9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bricks/_common_stm32/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static inline mp_uint_t disable_irq(void) {
} while (0);

#define MICROPY_GC_HOOK_LOOP(i) do { \
if ((i & 0xf) == 0) { \
if (((i) & 0xf) == 0) { \
MICROPY_VM_HOOK_LOOP \
} \
} while (0)
Expand Down
2 changes: 1 addition & 1 deletion bricks/ev3/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static inline mp_uint_t disable_irq(void) {
} while (0);

#define MICROPY_GC_HOOK_LOOP(i) do { \
if ((i & 0xf) == 0) { \
if (((i) & 0xf) == 0) { \
MICROPY_VM_HOOK_LOOP \
} \
} while (0)
Expand Down
2 changes: 1 addition & 1 deletion bricks/ev3rt/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static inline mp_uint_t disable_irq(void) {
} while (0);

#define MICROPY_GC_HOOK_LOOP(i) do { \
if ((i & 0xf) == 0) { \
if (((i) & 0xf) == 0) { \
MICROPY_VM_HOOK_LOOP \
} \
} while (0)
Expand Down
2 changes: 1 addition & 1 deletion bricks/virtualhub/mpconfigvariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
} while (0);

#define MICROPY_GC_HOOK_LOOP(i) do { \
if ((i & 0xf) == 0) { \
if (((i) & 0xf) == 0) { \
MICROPY_VM_HOOK_LOOP \
} \
} while (0)
Expand Down

0 comments on commit db2ecc9

Please sign in to comment.