Skip to content
Snippets Groups Projects
Commit 42f2a5f0 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

Merge "Fix misc-macro-parentheses warnings." am: d62aa0b1 am: ebb3dc9e

am: b077a756

* commit 'b077a756':
  Fix misc-macro-parentheses warnings.

Change-Id: Id30093c7a5ef204b81ff8d7c854e065b6da0bba2
parents 07245621 b077a756
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/** /**
* Initializes an empty, static list. * Initializes an empty, static list.
*/ */
#define list_init(free_fn) { .head = NULL, .tail = NULL, .freefn = free_fn } #define list_init(free_fn) { .head = NULL, .tail = NULL, .freefn = (free_fn) }
/** /**
* given an item in the list, finds the offset for the container * given an item in the list, finds the offset for the container
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* *
*/ */
#define list_entry(element, type, name) \ #define list_entry(element, type, name) \
(type *)(((uint8_t *)element) - (uint8_t *)&(((type *)NULL)->name)) (type *)(((uint8_t *)(element)) - (uint8_t *)&(((type *)NULL)->name))
/** /**
* Iterates over the list, do not free elements from the list when using this. * Iterates over the list, do not free elements from the list when using this.
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* @var The variable name for the cursor * @var The variable name for the cursor
*/ */
#define list_for_each(list, var) \ #define list_for_each(list, var) \
for(var = (list)->head; var != NULL; var = var->next) for(var = (list)->head; var != NULL; var = var->next) /*NOLINT*/
typedef struct hash_entry hash_entry; typedef struct hash_entry hash_entry;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment