diff --git a/internal.h b/internal.h index a9b3ee4824..06f61d85fe 100644 --- a/internal.h +++ b/internal.h @@ -25,8 +25,8 @@ extern "C" { /* likely */ #if __GNUC__ >= 3 -#define LIKELY(x) (__builtin_expect(!(x), 0)) -#define UNLIKELY(x) (__builtin_expect(!(x), 1)) +#define LIKELY(x) (__builtin_expect(!!(x), 1)) +#define UNLIKELY(x) (__builtin_expect(!!(x), 0)) #else /* __GNUC__ >= 3 */ #define LIKELY(x) (x) #define UNLIKELY(x) (x)