projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c60654
)
afs: Use correct error code for com_select().
author
Andre Noll
<maan@tuebingen.mpg.de>
Sun, 30 Jul 2017 00:04:47 +0000
(
02:04
+0200)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Sat, 12 Aug 2017 18:18:13 +0000
(20:18 +0200)
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.
afs.c
patch
|
blob
|
history
error.h
patch
|
blob
|
history
diff --git
a/afs.c
b/afs.c
index
4857f9b
..
b92cf0f
100644
(file)
--- 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 -E
RRNO_TO_PARA_ERROR(EINVAL)
;
if (ret < 0)
return ret;
}
diff --git
a/error.h
b/error.h
index
e5d2469
..
e792b05
100644
(file)
--- 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"), \