Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: hints: fix type conversion problem in odp_unlikely()
Convert the argument of odp_unlikely() to boolean before passing it to __builtin_expect() which takes a long int argument. This prevents implementation-defined behaviour when the argument of odp_unlikely() does not fit in a long int. In certain systems with 32-bit long, odp_unlikely() currently turns certain non-zero 64-bit values to zero, breaking the code that is using odp_unlikely(). Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
- Loading branch information