diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/gccmacro.h | 4 | ||||
-rw-r--r-- | src/pulsecore/macro.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/gccmacro.h b/src/pulsecore/gccmacro.h index ecdc0578..f1646653 100644 --- a/src/pulsecore/gccmacro.h +++ b/src/pulsecore/gccmacro.h @@ -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) diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h index 548e4ed9..98e023aa 100644 --- a/src/pulsecore/macro.h +++ b/src/pulsecore/macro.h @@ -77,8 +77,8 @@ static inline size_t pa_page_align(size_t l) { #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 |