aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue_print.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/queue_print.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/queue_print.c b/src/queue_print.c
index b7510a15d..3c0437ca0 100644
--- a/src/queue_print.c
+++ b/src/queue_print.c
@@ -84,20 +84,20 @@ queue_search(struct client *client, const struct queue *queue,
unsigned num_items, const struct locate_item *items)
{
unsigned i;
- struct locate_item *new_items =
- g_memdup(items, sizeof(items[0]) * num_items);
+ struct locate_item_list *new_list = locate_item_list_new(num_items);
for (i = 0; i < num_items; i++)
- new_items[i].needle = g_utf8_casefold(new_items[i].needle, -1);
+ new_list->items[i].needle =
+ g_utf8_casefold(items[i].needle, -1);
for (i = 0; i < queue_length(queue); i++) {
const struct song *song = queue_get(queue, i);
- if (locate_song_search(song, num_items, new_items))
+ if (locate_song_search(song, num_items, new_list->items))
queue_print_song_info(client, queue, i);
}
- locate_item_list_free(num_items, new_items);
+ locate_item_list_free(new_list);
}
void