git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9f1c162
)
s4-ldb: update dlinklist.h to match main copy (lib/util/dlinklist.h)
author
Michael Adam
<obnox@samba.org>
Fri, 28 Aug 2009 12:09:58 +0000
(14:09 +0200)
committer
Michael Adam
<obnox@samba.org>
Fri, 28 Aug 2009 12:25:40 +0000
(14:25 +0200)
Michael
source4/lib/ldb/include/dlinklist.h
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/include/dlinklist.h
b/source4/lib/ldb/include/dlinklist.h
index acab9fa043a81537bf1938aa24cd1574862b372b..62f885dd30c9c010f1e25a0933cee1a19e87ae64 100644
(file)
--- a/
source4/lib/ldb/include/dlinklist.h
+++ b/
source4/lib/ldb/include/dlinklist.h
@@
-23,6
+23,7
@@
#ifndef _DLINKLIST_H
#define _DLINKLIST_H
#ifndef _DLINKLIST_H
#define _DLINKLIST_H
+
/* hook into the front of the list */
#define DLIST_ADD(list, p) \
do { \
/* hook into the front of the list */
#define DLIST_ADD(list, p) \
do { \
@@
-38,7
+39,6
@@
do { \
} while (0)
/* remove an element from a list - element doesn't have to be in list. */
} while (0)
/* remove an element from a list - element doesn't have to be in list. */
-#ifndef DLIST_REMOVE
#define DLIST_REMOVE(list, p) \
do { \
if ((p) == (list)) { \
#define DLIST_REMOVE(list, p) \
do { \
if ((p) == (list)) { \
@@
-50,7
+50,6
@@
do { \
} \
if ((p) && ((p) != (list))) (p)->next = (p)->prev = NULL; \
} while (0)
} \
if ((p) && ((p) != (list))) (p)->next = (p)->prev = NULL; \
} while (0)
-#endif
/* promote an element to the top of the list */
#define DLIST_PROMOTE(list, p) \
/* promote an element to the top of the list */
#define DLIST_PROMOTE(list, p) \
@@
-59,7
+58,7
@@
do { \
DLIST_ADD(list, p); \
} while (0)
DLIST_ADD(list, p); \
} while (0)
-/* hook into the end of the list - needs
a tmp pointer
*/
+/* hook into the end of the list - needs
the entry type
*/
#define DLIST_ADD_END(list, p, type) \
do { \
if (!(list)) { \
#define DLIST_ADD_END(list, p, type) \
do { \
if (!(list)) { \
@@
-88,11
+87,11
@@
do { \
}\
} while (0)
}\
} while (0)
-/* demote an element to the end of the list, needs
a tmp pointer
*/
-#define DLIST_DEMOTE(list, p, t
mp
) \
+/* demote an element to the end of the list, needs
the entry type
*/
+#define DLIST_DEMOTE(list, p, t
ype
) \
do { \
DLIST_REMOVE(list, p); \
do { \
DLIST_REMOVE(list, p); \
- DLIST_ADD_END(list, p, t
mp
); \
+ DLIST_ADD_END(list, p, t
ype
); \
} while (0)
/* concatenate two lists - putting all elements of the 2nd list at the
} while (0)
/* concatenate two lists - putting all elements of the 2nd list at the