simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK
This commit is contained in:
committed by
Ondřej Surý
parent
668a972d1e
commit
6c2e138d7a
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user