]> git.ipfire.org Git - thirdparty/suricata.git/commit
Add removal safe TAILQ iterator.
authorEric Leblond <eric@regit.org>
Wed, 28 Nov 2012 12:22:22 +0000 (13:22 +0100)
committerEric Leblond <eric@regit.org>
Wed, 28 Nov 2012 16:44:53 +0000 (17:44 +0100)
commit9c47ada7718cbb201ec02dd07dfe1aa10d5fb545
treee7005c420accf364deb408b273694d787f21e1dc
parent06751ecd756cf77f9eb91e7fd53b10058c4dad01
Add removal safe TAILQ iterator.

TAILQ_FOREACH macro was not safe for element removal as it was
accessing the next element in case of a free. This patch is inspired
by Linux list handling and provide a new macro TAILQ_FOREACH_SAFE.
This macro is removal safe and only differs by a last argument being
a temporaty pointer to an element.
src/queue.h
src/unix-manager.c