]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/include/rte_branch_prediction.h
eal: simplify meson build of common directory
[dpdk.git] / lib / librte_eal / common / include / rte_branch_prediction.h
index bb26f415f279e56a6b61034443ec5efca6ded869..854ef9e5dde248b76beea82f077ce121a21fd847 100644 (file)
@@ -21,7 +21,7 @@
  *
  */
 #ifndef likely
-#define likely(x)  __builtin_expect((x),1)
+#define likely(x)      __builtin_expect(!!(x), 1)
 #endif /* likely */
 
 /**
@@ -35,7 +35,7 @@
  *
  */
 #ifndef unlikely
-#define unlikely(x)  __builtin_expect((x),0)
+#define unlikely(x)    __builtin_expect(!!(x), 0)
 #endif /* unlikely */
 
 #endif /* _RTE_BRANCH_PREDICTION_H_ */