diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-17 02:06:16 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-17 02:06:16 +0000 |
commit | 7b97ac289ed472e03b2a6e9c51a568478a93562d (patch) | |
tree | 9abd6f464a5ba47a3fb73b8120f4e5fa7d523579 /source/include/dlinklist.h | |
parent | 4e76f338698aaacdfa750205a1de7296b78cdd87 (diff) | |
download | samba-7b97ac289ed472e03b2a6e9c51a568478a93562d.tar.gz samba-7b97ac289ed472e03b2a6e9c51a568478a93562d.tar.xz samba-7b97ac289ed472e03b2a6e9c51a568478a93562d.zip |
I'm happy with the mapping for NT getACL, now for NT setACL.
Jeremy.
Diffstat (limited to 'source/include/dlinklist.h')
-rw-r--r-- | source/include/dlinklist.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/include/dlinklist.h b/source/include/dlinklist.h index 447948b5211..d510aad0285 100644 --- a/source/include/dlinklist.h +++ b/source/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); \ + } \ +} |