X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_branch_prediction.h;h=854ef9e5dde248b76beea82f077ce121a21fd847;hb=df3ff6be2b33faea3edf3c112b9bdc5b74d6f684;hp=bb26f415f279e56a6b61034443ec5efca6ded869;hpb=369991d997e4abdee355e19ffbb41a4d246cafa2;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_branch_prediction.h b/lib/librte_eal/common/include/rte_branch_prediction.h index bb26f415f2..854ef9e5dd 100644 --- a/lib/librte_eal/common/include/rte_branch_prediction.h +++ b/lib/librte_eal/common/include/rte_branch_prediction.h @@ -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_ */