From 172e0bbe14eecc90ee744f2aaf96a97f18e48ff8 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 20 Aug 2017 21:51:05 +0200 Subject: [PATCH] Fix bug of _swap. --- m-i-list.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/m-i-list.h b/m-i-list.h index 9d3155c4..a65a3e63 100644 --- a/m-i-list.h +++ b/m-i-list.h @@ -447,6 +447,8 @@ typedef struct ilist_head_s { ILISTI_CONTRACT(name, e); \ M_SWAP(struct ilist_head_s *, d->name.next, e->name.next); \ M_SWAP(struct ilist_head_s *, d->name.prev, e->name.prev); \ + M_SWAP(struct ilist_head_s *, d->name.next->prev, e->name.next->prev); \ + M_SWAP(struct ilist_head_s *, d->name.prev->next, e->name.prev->next); \ ILISTI_CONTRACT(name, d); \ ILISTI_CONTRACT(name, e); \ } \