summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_double_list.h
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-04-10 22:57:21 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-04-11 09:32:26 +0900
commitbc56e87ce180ddca63bcb9774366fc380214a2ef (patch)
treee7286d06f425e1683875414fe106723780957fa3 /src/gallium/auxiliary/util/u_double_list.h
parentc95dcc49629b72b95826e87e067d7a48753605fb (diff)
gallium: Attribute realloc leaks to the first malloc call.
Diffstat (limited to 'src/gallium/auxiliary/util/u_double_list.h')
-rw-r--r--src/gallium/auxiliary/util/u_double_list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_double_list.h b/src/gallium/auxiliary/util/u_double_list.h
index 8cb10c9820..d108d92e52 100644
--- a/src/gallium/auxiliary/util/u_double_list.h
+++ b/src/gallium/auxiliary/util/u_double_list.h
@@ -70,6 +70,14 @@ struct list_head
(__list)->prev = (__item); \
} while(0)
+#define LIST_REPLACE(__from, __to) \
+ do { \
+ (__to)->prev = (__from)->prev; \
+ (__to)->next = (__from)->next; \
+ (__from)->next->prev = (__to); \
+ (__from)->prev->next = (__to); \
+ } while (0)
+
#define LIST_DEL(__item) \
do { \
(__item)->prev->next = (__item)->next; \