From 144bbfd57c21983409d77cdb283506b381fbfade Mon Sep 17 00:00:00 2001 From: Andrew Gabbasov Date: Tue, 27 Nov 2012 17:43:38 +0100 Subject: [PATCH] Make upper bound of kernel version checking macro exclusive It's more usable to have the upper limit exclusive. It helps to avoid hardcoding of stable branch highest version number, i.e. having a range from 3.1.0 up to 3.2.0 (exclusively) gives us all 3.1.x versions. Signed-off-by: Andrew Gabbasov Signed-off-by: Mathieu Desnoyers --- lttng-kernel-version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lttng-kernel-version.h b/lttng-kernel-version.h index 280a398a..0eb56b38 100644 --- a/lttng-kernel-version.h +++ b/lttng-kernel-version.h @@ -27,10 +27,10 @@ /* * This macro checks if the kernel version is between the two specified - * versions (inclusive). + * versions (lower limit inclusive, upper limit exclusive). */ #define LTTNG_KERNEL_RANGE(a_low, b_low, c_low, a_high, b_high, c_high) \ (LINUX_VERSION_CODE >= KERNEL_VERSION(a_low, b_low, c_low) && \ - LINUX_VERSION_CODE <= KERNEL_VERSION(a_high, b_high, c_high)) + LINUX_VERSION_CODE < KERNEL_VERSION(a_high, b_high, c_high)) #endif /* _LTTNG_KERNEL_VERSION_H */ -- 2.34.1