From 93488c77e99742dd269f6a56b79694f1c99a5532 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 10 Aug 2003 04:39:24 +0000 Subject: Update likely() to cope with truth values other than 1 --- include/features.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/features.h b/include/features.h index 315c323a1..bc3619f7e 100644 --- a/include/features.h +++ b/include/features.h @@ -422,8 +422,8 @@ uClibc was built without large file support enabled. #define __builtin_expect(x, expected_value) (x) #endif -#define likely(x) __builtin_expect(((int)(x)),1) -#define unlikely(x) __builtin_expect(((int)(x)),0) +#define likely(x) __builtin_expect(!!((int)(x)),1) +#define unlikely(x) __builtin_expect(((int)(x)),0) /* --- this is added to integrate linuxthreads */ #define __USE_UNIX98 1 -- cgit v1.2.3