Re: [PATCH 3/5] qemu/queue.h: add QLIST_SAFE_REMOVE()

2020-02-19 Thread Sergio Lopez
On Fri, Feb 14, 2020 at 05:17:10PM +, Stefan Hajnoczi wrote: > QLIST_REMOVE() assumes the element is in a list. It also leaves the > element's linked list pointers dangling. > > Introduce a safe version of QLIST_REMOVE() and convert open-coded > instances of this pattern. > > Signed-off-by:

[PATCH 3/5] qemu/queue.h: add QLIST_SAFE_REMOVE()

2020-02-14 Thread Stefan Hajnoczi
QLIST_REMOVE() assumes the element is in a list. It also leaves the element's linked list pointers dangling. Introduce a safe version of QLIST_REMOVE() and convert open-coded instances of this pattern. Signed-off-by: Stefan Hajnoczi --- block.c | 5 + chardev/spice.c |