playlist_print: use bool instead of int

Return true on success, instead of 0.  Converted the "detail"
parameter to bool.
This commit is contained in:
Max Kellermann
2009-02-04 21:04:30 +01:00
parent f817285922
commit 60bec77664
3 changed files with 22 additions and 16 deletions

View File

@@ -686,26 +686,30 @@ handle_load(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
static enum command_return
handle_listplaylist(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
{
int ret;
bool ret;
ret = spl_print(client, argv[1], 0);
if (ret == -1)
ret = spl_print(client, argv[1], false);
if (!ret) {
command_error(client, ACK_ERROR_NO_EXIST, "No such playlist");
return COMMAND_RETURN_ERROR;
}
return ret;
return COMMAND_RETURN_OK;
}
static enum command_return
handle_listplaylistinfo(struct client *client,
G_GNUC_UNUSED int argc, char *argv[])
{
int ret;
bool ret;
ret = spl_print(client, argv[1], 1);
if (ret == -1)
ret = spl_print(client, argv[1], true);
if (!ret) {
command_error(client, ACK_ERROR_NO_EXIST, "No such playlist");
return COMMAND_RETURN_ERROR;
}
return ret;
return COMMAND_RETURN_OK;
}
static enum command_return