X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;h=81f901c2d5d171bda6a6f064124d8c49bbf76944;hp=8185c85abfdacdece8bd4442cc10ca2898b8bd32;hb=cf3f19ae5f634bf07dcdb771e66d40f805700a17;hpb=8802e4bd6e15eb61453b73fa0dc9ba1c32d5433a diff --git a/src/common/macros.h b/src/common/macros.h index 8185c85ab..81f901c2d 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -52,4 +52,12 @@ #define ARRAY_SIZE(array) (sizeof(array) / (sizeof((array)[0]))) #endif +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + #endif /* _MACROS_H */