[uClibc-cvs] uClibc/include features.h,1.48,1.49

Erik Andersen andersen at uclibc.org
Sun Aug 10 04:39:28 UTC 2003


Update of /var/cvs/uClibc/include
In directory winder:/tmp/cvs-serv9969

Modified Files:
	features.h 
Log Message:
Update likely() to cope with truth values other than 1 


Index: features.h
===================================================================
RCS file: /var/cvs/uClibc/include/features.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- features.h	17 Feb 2003 14:16:14 -0000	1.48
+++ features.h	10 Aug 2003 04:39:24 -0000	1.49
@@ -422,8 +422,8 @@
 #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




More information about the uClibc-cvs mailing list