From: Andre Noll Date: Sun, 30 Jul 2017 00:04:47 +0000 (+0200) Subject: afs: Use correct error code for com_select(). X-Git-Tag: v0.6.1~22 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=b77844da491b8d41c2937f37108d041f937c124e afs: Use correct error code for com_select(). If the argument does not start with "m/" or "p/" we have an invalid argument rather than a syntax error. This removes the last user of E_AFS_SYNTAX, so the error code can be removed as well. --- diff --git a/afs.c b/afs.c index 4857f9bc..b92cf0f2 100644 --- a/afs.c +++ b/afs.c @@ -482,7 +482,7 @@ static int activate_mood_or_playlist(const char *arg, int *num_admissible) ret = change_current_mood(arg + 2); mode = PLAY_MODE_MOOD; } else - return -E_AFS_SYNTAX; + return -ERRNO_TO_PARA_ERROR(EINVAL); if (ret < 0) return ret; } diff --git a/error.h b/error.h index e5d2469b..e792b058 100644 --- a/error.h +++ b/error.h @@ -17,7 +17,6 @@ PARA_ERROR(AFS_SHORT_READ, "short read from afs socket"), \ PARA_ERROR(AFS_SIGNAL, "afs caught deadly signal"), \ PARA_ERROR(AFS_SOCKET, "afs socket not writable"), \ - PARA_ERROR(AFS_SYNTAX, "afs syntax error"), \ PARA_ERROR(AFT_SYNTAX, "audio file table syntax error"), \ PARA_ERROR(ALSA, "alsa error"), \ PARA_ERROR(ALSA_MIX_GET_VAL, "could not read control element state"), \