summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-08-10 04:39:24 +0000
committerEric Andersen <andersen@codepoet.org>2003-08-10 04:39:24 +0000
commit93488c77e99742dd269f6a56b79694f1c99a5532 (patch)
treef2bacca2774e6220e8135b27f1993f0699f56365
parenta5e73624079942c586e69a018f5ceb90fd776e5b (diff)
Update likely() to cope with truth values other than 1
-rw-r--r--include/features.h4
1 files changed, 2 insertions, 2 deletions
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