From 70c812e6aee0fa9b10b660f4051cc5460c023917 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 17 Mar 2001 02:06:16 +0000 Subject: I'm happy with the mapping for NT getACL, now for NT setACL. Jeremy. (This used to be commit 7b97ac289ed472e03b2a6e9c51a568478a93562d) --- source3/include/dlinklist.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source3/include') diff --git a/source3/include/dlinklist.h b/source3/include/dlinklist.h index 447948b521..d510aad028 100644 --- a/source3/include/dlinklist.h +++ b/source3/include/dlinklist.h @@ -56,3 +56,18 @@ DLIST_REMOVE(list, p) \ DLIST_ADD(list, p) \ } + +/* demote an element to the top of the list, needs a tmp pointer */ +#define DLIST_DEMOTE(list, p, tmp) \ +{ \ + DLIST_REMOVE(list, p) \ + if (!(list)) { \ + (list) = (p); \ + (p)->next = (p)->prev = NULL; \ + } else { \ + for ((tmp) = (list); (tmp)->next; (tmp) = (tmp)->next) ; \ + (tmp)->next = (p); \ + (p)->next = NULL; \ + (p)->prev = (tmp); \ + } \ +} -- cgit