simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK

This commit is contained in:
Mark Andrews
2020-01-30 17:27:08 +11:00
committed by Ondřej Surý
parent 668a972d1e
commit 6c2e138d7a

View File

@@ -15,6 +15,10 @@
/*%
* Performance
*/
#ifdef CPPCHECK
#define ISC_LIKELY(x) (x)
#define ISC_UNLIKELY(x) (x)
#else
#ifdef HAVE_BUILTIN_EXPECT
#define ISC_LIKELY(x) __builtin_expect(!!(x), 1)
#define ISC_UNLIKELY(x) __builtin_expect(!!(x), 0)
@@ -22,5 +26,6 @@
#define ISC_LIKELY(x) (x)
#define ISC_UNLIKELY(x) (x)
#endif
#endif
#endif /* ISC_LIKELY_H */