summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-05-22 22:50:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-22 22:50:53 +0000
commit2113474ae090ee4c6a06864011ce8a4e4cae9673 (patch)
tree51f77364a3b016b64f253243a172aeb7999ecb07
parentfcc81e3c6f0724b3b360b19071005e559334bc58 (diff)
parent17c3a227505988b33e1219a8e0a921de874f9b70 (diff)
downloadsystem_core-2113474ae090ee4c6a06864011ce8a4e4cae9673.zip
system_core-2113474ae090ee4c6a06864011ce8a4e4cae9673.tar.gz
system_core-2113474ae090ee4c6a06864011ce8a4e4cae9673.tar.bz2
am 17c3a227: am 617c28b8: Merge "Fix list_for_each_safe macro"
* commit '17c3a227505988b33e1219a8e0a921de874f9b70': Fix list_for_each_safe macro
-rw-r--r--include/cutils/list.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/cutils/list.h b/include/cutils/list.h
index 6e94ddf..4ba2cfd 100644
--- a/include/cutils/list.h
+++ b/include/cutils/list.h
@@ -44,10 +44,10 @@ struct listnode
#define list_for_each_reverse(node, list) \
for (node = (list)->prev; node != (list); node = node->prev)
-#define list_for_each_safe(node, next, list) \
- for (node = (list)->next, next = node->next; \
+#define list_for_each_safe(node, n, list) \
+ for (node = (list)->next, n = node->next; \
node != (list); \
- node = next, next = node->next)
+ node = n, n = node->next)
static inline void list_init(struct listnode *node)
{