From 54cfbc0751c7fd08e6806a4d59eaa8ea685f1e50 Mon Sep 17 00:00:00 2001 From: "mats.palmgren%bredband.net" Date: Thu, 9 Nov 2006 17:41:03 +0000 Subject: [PATCH] Make NS_LIKELY/NS_UNLIKELY accept pointers etc. b=340244 r+sr=darin git-svn-id: svn://10.0.0.236/trunk@215037 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/base/nscore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/xpcom/base/nscore.h b/mozilla/xpcom/base/nscore.h index 9d3e71a42e2..042cbb2eb42 100644 --- a/mozilla/xpcom/base/nscore.h +++ b/mozilla/xpcom/base/nscore.h @@ -459,8 +459,8 @@ typedef PRUint32 nsrefcnt; */ #if defined(__GNUC__) && (__GNUC__ > 2) -#define NS_LIKELY(x) (__builtin_expect((x), 1)) -#define NS_UNLIKELY(x) (__builtin_expect((x), 0)) +#define NS_LIKELY(x) (__builtin_expect(!!(x), 1)) +#define NS_UNLIKELY(x) (__builtin_expect(!!(x), 0)) #else #define NS_LIKELY(x) (x) #define NS_UNLIKELY(x) (x)