android: generate files by $(call es-gen)
[mesa.git] / src / glsl / list.h
index 85368a4e6c45784d37d3e4177f38f8fedd5e6b1e..15fcd4abd1c486ded6e39a049c27a7fc60e1b32c 100644 (file)
  * Therefore, if \c head->next is \c NULL or \c tail_prev->prev is \c NULL,
  * the list is empty.
  *
+ * Do note that this means that the list nodes will contain pointers into the
+ * list structure itself and as a result you may not \c realloc() an  \c
+ * exec_list or any structure in which an \c exec_list is embedded.
+ *
  * To anyone familiar with "exec lists" on the Amiga, this structure should
  * be immediately recognizable.  See the following link for the original Amiga
  * operating system documentation on the subject.
@@ -680,7 +684,7 @@ inline void exec_node::insert_before(exec_list *before)
            exec_node_data(__type, (__list)->head, __field),                \
                * __next =                                                  \
            exec_node_data(__type, (__node)->__field.next, __field);        \
-        __next != NULL;                                                    \
+        (__node)->__field.next != NULL;                                    \
         __node = __next, __next =                                          \
            exec_node_data(__type, (__next)->__field.next, __field))
 
@@ -689,7 +693,7 @@ inline void exec_node::insert_before(exec_list *before)
            exec_node_data(__type, (__list)->tail_pred, __field),           \
                * __prev =                                                  \
            exec_node_data(__type, (__node)->__field.prev, __field);        \
-        __prev != NULL;                                                    \
+        (__node)->__field.prev != NULL;                                    \
         __node = __prev, __prev =                                          \
            exec_node_data(__type, (__prev)->__field.prev, __field))