summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWander Lairson Costa <wander.lairson@gmail.com>2020-07-03 14:06:03 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-07-03 18:17:29 +0200
commitb767e286252dfbd50c2f63a5e7c5202960e7b153 (patch)
treeea279fd02ace41f682b87b91714cee0fa73ba569
parentd55b7939d6088e987d23ee1b8835cdaeecb55136 (diff)
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
-rw-r--r--src/lib/eina/eina_types.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/eina/eina_types.h b/src/lib/eina/eina_types.h
index b93e99f483..25ad33a89a 100644
--- a/src/lib/eina/eina_types.h
+++ b/src/lib/eina/eina_types.h
@@ -264,8 +264,8 @@
264# define EINA_FORMAT(fmt) 264# define EINA_FORMAT(fmt)
265# define EINA_CONST 265# define EINA_CONST
266# define EINA_NOINSTRUMENT 266# define EINA_NOINSTRUMENT
267# define EINA_UNLIKELY(exp) exp 267# define EINA_UNLIKELY(exp) (exp)
268# define EINA_LIKELY(exp) exp 268# define EINA_LIKELY(exp) (exp)
269# define EINA_SENTINEL 269# define EINA_SENTINEL
270# define EINA_FALLTHROUGH 270# define EINA_FALLTHROUGH
271# define EINA_PREFETCH(arg) ((void) (arg)) 271# define EINA_PREFETCH(arg) ((void) (arg))
@@ -290,8 +290,8 @@
290# define EINA_FORMAT(fmt) 290# define EINA_FORMAT(fmt)
291# define EINA_CONST 291# define EINA_CONST
292# define EINA_NOINSTRUMENT 292# define EINA_NOINSTRUMENT
293# define EINA_UNLIKELY(exp) exp 293# define EINA_UNLIKELY(exp) (exp)
294# define EINA_LIKELY(exp) exp 294# define EINA_LIKELY(exp) (exp)
295# define EINA_SENTINEL 295# define EINA_SENTINEL
296# define EINA_FALLTHROUGH 296# define EINA_FALLTHROUGH
297# define EINA_PREFETCH(arg) ((void) (arg)) 297# define EINA_PREFETCH(arg) ((void) (arg))
@@ -320,8 +320,8 @@
320# define EINA_CONST 320# define EINA_CONST
321# endif 321# endif
322# define EINA_NOINSTRUMENT 322# define EINA_NOINSTRUMENT
323# define EINA_UNLIKELY(exp) exp 323# define EINA_UNLIKELY(exp) (exp)
324# define EINA_LIKELY(exp) exp 324# define EINA_LIKELY(exp) (exp)
325# define EINA_SENTINEL 325# define EINA_SENTINEL
326# define EINA_FALLTHROUGH 326# define EINA_FALLTHROUGH
327# define EINA_PREFETCH(arg) ((void) (arg)) 327# define EINA_PREFETCH(arg) ((void) (arg))
@@ -424,7 +424,7 @@
424 * processor architectures can then optimize the more likely path. 424 * processor architectures can then optimize the more likely path.
425 * @param[in] exp The expression to be used. 425 * @param[in] exp The expression to be used.
426 */ 426 */
427# define EINA_UNLIKELY(exp) exp 427# define EINA_UNLIKELY(exp) (exp)
428 428
429/** 429/**
430 * @def EINA_LIKELY 430 * @def EINA_LIKELY
@@ -432,7 +432,7 @@
432 * processor architectures can then optimize the more likely path. 432 * processor architectures can then optimize the more likely path.
433 * @param[in] exp The expression to be used. 433 * @param[in] exp The expression to be used.
434 */ 434 */
435# define EINA_LIKELY(exp) exp 435# define EINA_LIKELY(exp) (exp)
436 436
437/** 437/**
438 * @def EINA_SENTINEL 438 * @def EINA_SENTINEL