queue: check if list_move is already defined
This commit is contained in:
parent
b497168ab4
commit
0d5194c17c
1 changed files with 3 additions and 1 deletions
|
@ -86,12 +86,14 @@
|
|||
* Some extra functions for LIST manipulation
|
||||
*/
|
||||
|
||||
#ifndef LIST_MOVE
|
||||
#define LIST_MOVE(newhead, oldhead, field) do { \
|
||||
if((oldhead)->lh_first) { \
|
||||
(oldhead)->lh_first->field.le_prev = &(newhead)->lh_first; \
|
||||
} \
|
||||
(newhead)->lh_first = (oldhead)->lh_first; \
|
||||
} while (0)
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define LIST_INSERT_SORTED(head, elm, field, cmpfunc) do { \
|
||||
if(LIST_EMPTY(head)) { \
|
||||
|
|
Loading…
Add table
Reference in a new issue