Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
queue: check if list_move is already defined
  • Loading branch information
clandmeter authored and perexg committed Jan 13, 2015
1 parent b497168 commit 0d5194c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/queue.h
Expand Up @@ -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)) { \
Expand Down

0 comments on commit 0d5194c

Please sign in to comment.