]> 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>
Sat, 8 Feb 2020 14:32:42 +0000 (06:32 -0800)
(cherry picked from commit 6c2e138d7aac0e7487b2ba2df6796ba64ccfc26b)

lib/isc/include/isc/likely.h

index 6c77957ebd995be1be29f622018408d67039e2f2..b127f45027747fa4d35fd659139a21a3803d2555 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 */