aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_print.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/song_print.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/song_print.c b/src/song_print.c
index 3b4275472..647e6d594 100644
--- a/src/song_print.c
+++ b/src/song_print.c
@@ -42,14 +42,14 @@ int song_print_info(struct client *client, Song * song)
return 0;
}
-int songvec_print(struct client *client, const struct songvec *sv)
+static int
+song_print_info_x(Song *song, void *data)
{
- int i;
- Song **sp = sv->base;
-
- for (i = sv->nr; --i >= 0;)
- if (song_print_info(client, *sp++) < 0)
- return -1;
+ struct client *client = data;
+ return song_print_info(client, song);
+}
- return 0;
+int songvec_print(struct client *client, const struct songvec *sv)
+{
+ return songvec_for_each(sv, song_print_info_x, client);
}