projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f221c78
)
altos: Wrap ao_container_of value in parens
author
Keith Packard
<keithp@keithp.com>
Thu, 25 Oct 2012 20:33:43 +0000
(13:33 -0700)
committer
Keith Packard
<keithp@keithp.com>
Thu, 25 Oct 2012 20:33:43 +0000
(13:33 -0700)
Keeps the cast from being separated from the value when used
in expressions.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_list.h
patch
|
blob
|
history
diff --git
a/src/core/ao_list.h
b/src/core/ao_list.h
index 23cf18417ed7f292bb3ecdc728131232207909d1..8a6fa4d92eb90571ec949f3db17a02215b9e90df 100644
(file)
--- a/
src/core/ao_list.h
+++ b/
src/core/ao_list.h
@@
-137,7
+137,7
@@
ao_list_is_empty(struct ao_list *head)
* @return A pointer to the data struct containing the list head.
*/
#define ao_container_of(ptr, type, member) \
-
(type *)((char *)(ptr) - offsetof(type, member
))
+
((type *)((char *)(ptr) - offsetof(type, member)
))
/**
* Alias of ao_container_of