fix (kernel): Fixed 'CEIL_TO' bug, that caused the value to ceil up one step, if already aligned

This commit is contained in:
antifallobst 2023-02-11 14:45:22 +01:00
parent 2aaef2d715
commit c15c42ca35
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@
#define MAX(a, b) (a > b ? a : b) #define MAX(a, b) (a > b ? a : b)
#define MIN(a, b) (a > b ? b : a) #define MIN(a, b) (a > b ? b : a)
#define CEIL_TO(a, b) (a + b - (a % b)) #define CEIL_TO(a, b) (a % b ? a + b - (a % b) : a)
#define FLOOR_TO(a, b) (a - (a % b)) #define FLOOR_TO(a, b) (a - (a % b))
uint64_t pow(uint64_t base, uint64_t exp); uint64_t pow(uint64_t base, uint64_t exp);