diff --git a/include/l4/lib/math.h b/include/l4/lib/math.h index 59e0d24..320380e 100644 --- a/include/l4/lib/math.h +++ b/include/l4/lib/math.h @@ -1,8 +1,15 @@ #ifndef __LIB_MATH_H__ #define __LIB_MATH_H__ -#define min(x, y) (((x) < (y)) ? (x) : (y)) -#define max(x, y) (((x) > (y)) ? (x) : (y)) +static inline int min(int x, int y) +{ + return x < y ? x : y; +} + +static inline int max(int x, int y) +{ + return x > y ? x : y; +} /* Tests if ranges a-b intersect with range c-d */ static inline int set_intersection(unsigned long a, unsigned long b,