aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/ARM7/chcore.h2
-rw-r--r--ports/AVR/chcore.h2
-rw-r--r--ports/MSP430/chcore.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/ports/ARM7/chcore.h b/ports/ARM7/chcore.h
index a92ed5512..e2c6481b5 100644
--- a/ports/ARM7/chcore.h
+++ b/ports/ARM7/chcore.h
@@ -128,7 +128,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.
diff --git a/ports/AVR/chcore.h b/ports/AVR/chcore.h
index 44f7b3506..187a8463c 100644
--- a/ports/AVR/chcore.h
+++ b/ports/AVR/chcore.h
@@ -153,7 +153,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.
diff --git a/ports/MSP430/chcore.h b/ports/MSP430/chcore.h
index 3fc7161cb..c36fdd5c4 100644
--- a/ports/MSP430/chcore.h
+++ b/ports/MSP430/chcore.h
@@ -125,7 +125,7 @@ struct context {
/**
* Enforces a correct alignment for a stack area size value.
*/
-#define STACK_ALIGN(n) ((((n) - 1) | sizeof(stkalign_t)) + 1)
+#define STACK_ALIGN(n) ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
/**
* Computes the thread working area global size.