]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK
authorMark Andrews <marka@isc.org>
Thu, 30 Jan 2020 06:27:08 +0000 (17:27 +1100)
committerOndřej Surý <ondrej@isc.org>
Tue, 4 Feb 2020 10:09:22 +0000 (11:09 +0100)
lib/isc/include/isc/likely.h

index 8cc5b2eb4b7a82a34bcd277a469d9e73c7ad6af5..6f65e1b27dfca7f59dcb1ebb6d344aafc05a2565 100644 (file)
 /*%
  * 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 */