diff --git a/src/httpd_dacp.c b/src/httpd_dacp.c index 81f5eef0..2aa6b057 100644 --- a/src/httpd_dacp.c +++ b/src/httpd_dacp.c @@ -1439,14 +1439,14 @@ dacp_reply_playqueueedit_move(struct evhttp_request *req, struct evbuffer *evbuf */ int ret; - const char *editparams; + const char *param; int src; int dst; - editparams = evhttp_find_header(query, "edit-params"); - if (editparams) + param = evhttp_find_header(query, "edit-params"); + if (param) { - ret = safe_atoi32(strchr(editparams, ':') + 1, &src); + ret = safe_atoi32(strchr(param, ':') + 1, &src); if (ret < 0) { DPRINTF(E_LOG, L_DACP, "Invalid edit-params move-from value in playqueue-edit request\n"); @@ -1455,7 +1455,7 @@ dacp_reply_playqueueedit_move(struct evhttp_request *req, struct evbuffer *evbuf return; } - ret = safe_atoi32(strchr(editparams, ',') + 1, &dst); + ret = safe_atoi32(strchr(param, ',') + 1, &dst); if (ret < 0) { DPRINTF(E_LOG, L_DACP, "Invalid edit-params move-to value in playqueue-edit request\n"); @@ -1481,13 +1481,13 @@ dacp_reply_playqueueedit_remove(struct evhttp_request *req, struct evbuffer *evb */ int ret; - const char *itemsparam; + const char *param; int item_index; - itemsparam = evhttp_find_header(query, "items"); - if (itemsparam) + param = evhttp_find_header(query, "items"); + if (param) { - ret = safe_atoi32(itemsparam, &item_index); + ret = safe_atoi32(param, &item_index); if (ret < 0) { DPRINTF(E_LOG, L_DACP, "Invalid edit-params remove item value in playqueue-edit request\n"); diff --git a/src/player.c b/src/player.c index 07a2cbab..315f65ec 100644 --- a/src/player.c +++ b/src/player.c @@ -3398,22 +3398,24 @@ queue_add_next(struct player_command *cmd) static int queue_move(struct player_command *cmd) { - struct player_source *ps_src = NULL; - struct player_source *ps_dst = NULL; + struct player_source *ps_src; + struct player_source *ps_dst; + int i; int pos_max = MAX(cmd->arg.ps_pos[0], cmd->arg.ps_pos[1]); - DPRINTF(E_LOG, L_PLAYER, "Move song from position %d to be next song after %d\n", cmd->arg.ps_pos[0], + DPRINTF(E_DBG, L_PLAYER, "Move song from position %d to be next song after %d\n", cmd->arg.ps_pos[0], cmd->arg.ps_pos[1]); struct player_source *ps_tmp = cur_playing ? cur_playing : cur_streaming; if (!ps_tmp) { - DPRINTF(E_DBG, L_PLAYER, "Current playing/streaming song not found\n"); + DPRINTF(E_LOG, L_PLAYER, "Current playing/streaming song not found\n"); return 0; } - int i = 0; - for (i = 0; i <= pos_max; ++i) + ps_src = NULL; + ps_dst = NULL; + for (i = 0; i <= pos_max; i++) { if (i == cmd->arg.ps_pos[0]) ps_src = ps_tmp; @@ -3465,12 +3467,12 @@ queue_remove(struct player_command *cmd) { struct player_source *ps_src = NULL; - DPRINTF(E_LOG, L_PLAYER, "Remove song from position %d\n", cmd->arg.ps_pos[0]); + DPRINTF(E_DBG, L_PLAYER, "Remove song from position %d\n", cmd->arg.ps_pos[0]); struct player_source *ps_tmp = cur_playing ? cur_playing : cur_streaming; if (!ps_tmp) { - DPRINTF(E_DBG, L_PLAYER, "Current playing/streaming song not found\n"); + DPRINTF(E_LOG, L_PLAYER, "Current playing/streaming song not found\n"); return 0; }