diff options
| -rw-r--r-- | firmware/export/system.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index b85b09e..0f709cd 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -110,7 +110,7 @@ int get_cpu_boost_counter(void); #define ALIGN_UP_P2(n, p2) ALIGN_DOWN_P2((n) + P2_M1(p2),p2) /* align up or down to nearest integer multiple of a */ -#define ALIGN_DOWN(n, a) ((n)/(a)*(a)) +#define ALIGN_DOWN(n, a) ((typeof(n))((typeof(a))(n)/(a)*(a))) #define ALIGN_UP(n, a) ALIGN_DOWN((n)+((a)-1),a) /* align start and end of buffer to nearest integer multiple of a */ |