]> 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)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 5 Feb 2020 08:08:35 +0000 (09:08 +0100)
(cherry picked from commit 6c2e138d7aac0e7487b2ba2df6796ba64ccfc26b)

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 */