simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK

(cherry picked from commit 6c2e138d7a)
This commit is contained in:
Mark Andrews
2020-02-08 06:32:42 -08:00
committed by Ondřej Surý
parent 26caad3c12
commit 12cda20aa2
+5
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 */