1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/lib/webfuse/core/message_queue.c
Falk Werner a717248e80
chore(WF_CONTAINER_OF): makes WF_CONTAINER_OF use typeof, if available (#26)
* makes WF_CONTAINER_OF use typeof, if available

* convertss WF_CONTAINER_OF to lower case

* fixes include guard
2019-04-25 20:08:34 +02:00

18 lines
483 B
C

#include "webfuse/core/message_queue.h"
#include "webfuse/core/message.h"
#include "webfuse/core/container_of.h"
void wf_message_queue_cleanup(
struct wf_slist * queue)
{
struct wf_slist_item * item = queue->first;
while (NULL != item)
{
struct wf_slist_item * next = item->next;
struct wf_message * message = wf_container_of(item, struct wf_message, item);
wf_message_dispose(message);
item = next;
}
wf_slist_init(queue);
}