summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-05-22 22:27:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-22 22:27:14 +0000
commit617c28b8f2c9b90efa8b164ce2af2c7cd3007fbd (patch)
tree0a302ab1e09bf92860e7f769b7a10e07892a232b /include
parent4ecbda41c921f3209e96a3d72928a4bcba9422e6 (diff)
parent8cc74270405bbca5afa989b61c76b554c5b4f5a6 (diff)
downloadsystem_core-617c28b8f2c9b90efa8b164ce2af2c7cd3007fbd.zip
system_core-617c28b8f2c9b90efa8b164ce2af2c7cd3007fbd.tar.gz
system_core-617c28b8f2c9b90efa8b164ce2af2c7cd3007fbd.tar.bz2
Merge "Fix list_for_each_safe macro"
Diffstat (limited to 'include')
-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)
{