Fix list_for_each_safe macro

The second macro parameter is named 'next' like listnode structure
'next' field. Since the precompiler will expand all 'next' occurrences
in the macro definition with what is passed by the caller, it is not
possible to call this macro with something else than 'next' as second
parameter.

This patch replaces the 'next' parameter with 'n' allowing use of a
next node not named 'next'.

Change-Id: I78c859caf8193f21fe0bedaeaa8342d6e89ad14b
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
diff --git a/include/cutils/list.h b/include/cutils/list.h
index 945729a..6a6891b 100644
--- a/include/cutils/list.h
+++ b/include/cutils/list.h
@@ -44,10 +44,10 @@
 #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)
 {