aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_print.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-04 21:04:30 +0100
committerMax Kellermann <max@duempel.org>2009-02-04 21:04:30 +0100
commit60bec7766494b2f904658006dfc217d241f44ce8 (patch)
tree4395f0db4fac3bc26d3b43ba0098db7f1308d18c /src/playlist_print.c
parentf81728592278c667f4928d5201cd7932d6c4e8aa (diff)
downloadmpd-60bec7766494b2f904658006dfc217d241f44ce8.tar.gz
mpd-60bec7766494b2f904658006dfc217d241f44ce8.tar.xz
mpd-60bec7766494b2f904658006dfc217d241f44ce8.zip
playlist_print: use bool instead of int
Return true on success, instead of 0. Converted the "detail" parameter to bool.
Diffstat (limited to '')
-rw-r--r--src/playlist_print.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/playlist_print.c b/src/playlist_print.c
index 60696b772..c4a9c4f34 100644
--- a/src/playlist_print.c
+++ b/src/playlist_print.c
@@ -23,24 +23,24 @@
#include "database.h"
#include "client.h"
-int
-spl_print(struct client *client, const char *name_utf8, int detail)
+bool
+spl_print(struct client *client, const char *name_utf8, bool detail)
{
GPtrArray *list;
list = spl_load(name_utf8);
if (list == NULL)
- return -1;
+ return false;
for (unsigned i = 0; i < list->len; ++i) {
const char *temp = g_ptr_array_index(list, i);
- int wrote = 0;
+ bool wrote = false;
if (detail) {
struct song *song = db_get_song(temp);
if (song) {
song_print_info(client, song);
- wrote = 1;
+ wrote = true;
}
}
@@ -50,5 +50,5 @@ spl_print(struct client *client, const char *name_utf8, int detail)
}
spl_free(list);
- return 0;
+ return true;
}