Browse Source

Update likely() to cope with truth values other than 1

Eric Andersen 22 years ago
parent
commit
93488c77e9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      include/features.h

+ 2 - 2
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