Protect EINA_(UN)LIKELY with parenthesis around the expr

Without it an expression like !EINA_LIKELY(a && b) expands
!a && b

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12041
This commit is contained in:
Wander Lairson Costa 2020-07-03 14:06:03 +00:00 committed by Marcel Hollerbach
parent d55b7939d6
commit b767e28625
1 changed files with 8 additions and 8 deletions

View File

@ -264,8 +264,8 @@
# define EINA_FORMAT(fmt)
# define EINA_CONST
# define EINA_NOINSTRUMENT
# define EINA_UNLIKELY(exp) exp
# define EINA_LIKELY(exp) exp
# define EINA_UNLIKELY(exp) (exp)
# define EINA_LIKELY(exp) (exp)
# define EINA_SENTINEL
# define EINA_FALLTHROUGH
# define EINA_PREFETCH(arg) ((void) (arg))
@ -290,8 +290,8 @@
# define EINA_FORMAT(fmt)
# define EINA_CONST
# define EINA_NOINSTRUMENT
# define EINA_UNLIKELY(exp) exp
# define EINA_LIKELY(exp) exp
# define EINA_UNLIKELY(exp) (exp)
# define EINA_LIKELY(exp) (exp)
# define EINA_SENTINEL
# define EINA_FALLTHROUGH
# define EINA_PREFETCH(arg) ((void) (arg))
@ -320,8 +320,8 @@
# define EINA_CONST
# endif
# define EINA_NOINSTRUMENT
# define EINA_UNLIKELY(exp) exp
# define EINA_LIKELY(exp) exp
# define EINA_UNLIKELY(exp) (exp)
# define EINA_LIKELY(exp) (exp)
# define EINA_SENTINEL
# define EINA_FALLTHROUGH
# define EINA_PREFETCH(arg) ((void) (arg))
@ -424,7 +424,7 @@
* processor architectures can then optimize the more likely path.
* @param[in] exp The expression to be used.
*/
# define EINA_UNLIKELY(exp) exp
# define EINA_UNLIKELY(exp) (exp)
/**
* @def EINA_LIKELY
@ -432,7 +432,7 @@
* processor architectures can then optimize the more likely path.
* @param[in] exp The expression to be used.
*/
# define EINA_LIKELY(exp) exp
# define EINA_LIKELY(exp) (exp)
/**
* @def EINA_SENTINEL