summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-17 02:06:16 +0000
committerJeremy Allison <jra@samba.org>2001-03-17 02:06:16 +0000
commit70c812e6aee0fa9b10b660f4051cc5460c023917 (patch)
tree177bdbe8482fbe0779e9060437636447e16e56c7 /source3/include
parent5b45f4a6a6e4809039b9512b816be4809b151a3d (diff)
downloadsamba-70c812e6aee0fa9b10b660f4051cc5460c023917.tar.gz
samba-70c812e6aee0fa9b10b660f4051cc5460c023917.tar.bz2
samba-70c812e6aee0fa9b10b660f4051cc5460c023917.zip
I'm happy with the mapping for NT getACL, now for NT setACL.
Jeremy. (This used to be commit 7b97ac289ed472e03b2a6e9c51a568478a93562d)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/dlinklist.h15
1 files changed, 15 insertions, 0 deletions
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); \
+ } \
+}