aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/command.c b/src/command.c
index aafb88418..541a71a50 100644
--- a/src/command.c
+++ b/src/command.c
@@ -788,14 +788,12 @@ static int handlePlaylistMove(int fd, mpd_unused int *permission,
static int print_update_result(int fd, int ret)
{
- if (ret >= 0) {
+ if (ret > 0) {
fdprintf(fd, "updating_db: %i\n", ret);
return 0;
}
- if (ret == -2)
- commandError(fd, ACK_ERROR_ARG, "invalid path");
- else
- commandError(fd, ACK_ERROR_UPDATE_ALREADY, "already updating");
+ assert(!ret);
+ commandError(fd, ACK_ERROR_UPDATE_ALREADY, "already updating");
return -1;
}