[lttng-dev] [PATCH lttng-tools 1/3] Add max() and min() macro in common

David Goulet dgoulet at efficios.com
Tue Nov 13 14:50:43 EST 2012


All three patches are now upstream!

Cheers
David

Simon Marchi:
> Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
> ---
>  src/common/macros.h |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/src/common/macros.h b/src/common/macros.h
> index 8185c85..81f901c 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 */



More information about the lttng-dev mailing list