queue: check if list_move is already defined

This commit is contained in:
Carlo Landmeter 2015-01-13 14:33:08 +01:00 committed by Jaroslav Kysela
parent b497168ab4
commit 0d5194c17c

View file

@ -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)) { \