diff --git a/src/shared/queue.c b/src/shared/queue.c
index 20f51b8..8bbb7df 100644
--- a/src/shared/queue.c
+++ b/src/shared/queue.c
queue_unref(queue);
}
+static bool direct_match(const void *a, const void *b)
+{
+ return a == b;
+}
+
void *queue_find(struct queue *queue, queue_match_func_t function,
const void *match_data)
{
if (!queue || !function)
return NULL;
+ if (!function)
+ function = direct_match;
+
for (entry = queue->head; entry; entry = entry->next)
if (function(entry->data, match_data))
return entry->data;