[pulseaudio-commits] r2036 - in /trunk/src/pulsecore: gccmacro.h macro.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Nov 8 18:12:11 PST 2007


Author: lennart
Date: Fri Nov  9 03:12:09 2007
New Revision: 2036

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2036&root=pulseaudio&view=rev
Log:
fix CLAMP_LIKELY/UNLIKELY definition

Modified:
    trunk/src/pulsecore/gccmacro.h
    trunk/src/pulsecore/macro.h

Modified: trunk/src/pulsecore/gccmacro.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/gccmacro.h?rev=2036&root=pulseaudio&r1=2035&r2=2036&view=diff
==============================================================================
--- trunk/src/pulsecore/gccmacro.h (original)
+++ trunk/src/pulsecore/gccmacro.h Fri Nov  9 03:12:09 2007
@@ -79,8 +79,8 @@
 
 #ifndef PA_LIKELY
 #ifdef __GNUC__
-#define PA_LIKELY(x) __builtin_expect((x),1)
-#define PA_UNLIKELY(x) __builtin_expect((x),0)
+#define PA_LIKELY(x) (__builtin_expect((x),1))
+#define PA_UNLIKELY(x) (__builtin_expect((x),0))
 #else
 #define PA_LIKELY(x) (x)
 #define PA_UNLIKELY(x) (x)

Modified: trunk/src/pulsecore/macro.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/macro.h?rev=2036&root=pulseaudio&r1=2035&r2=2036&view=diff
==============================================================================
--- trunk/src/pulsecore/macro.h (original)
+++ trunk/src/pulsecore/macro.h Fri Nov  9 03:12:09 2007
@@ -77,8 +77,8 @@
 #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
 #endif
 
-#define PA_CLAMP_LIKELY(x, low, high) (PA_LIKELY((x) > (high)) ? (high) : PA_LIKELY(((x) < (low)) ? (low) : (x)))
-#define PA_CLAMP_UNLIKELY(x, low, high) (PA_UNLIKELY((x) > (high)) ? (high) : PA_UNLIKELY(((x) < (low)) ? (low) : (x)))
+#define PA_CLAMP_LIKELY(x, low, high) (PA_LIKELY((x) > (high)) ? (high) : (PA_LIKELY((x)<(low)) ? (low) : (x)))
+#define PA_CLAMP_UNLIKELY(x, low, high) (PA_UNLIKELY((x) > (high)) ? (high) : (PA_UNLIKELY((x) < (low)) ? (low) : (x)))
 
 /* This type is not intended to be used in exported APIs! Use classic "int" there! */
 #ifdef HAVE_STD_BOOL




More information about the pulseaudio-commits mailing list