summaryrefslogtreecommitdiffstats
path: root/options/m_option.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-02 13:52:36 +0200
committerwm4 <wm4@nowhere>2017-07-02 13:52:36 +0200
commitd24f4587a7cb85e559b06d7a191bb28bbdbf52ad (patch)
treed0a5cc277b3cdde6fea6416bc50f3248e372f5bb /options/m_option.c
parent1097c1416f352fe4da49391548224a057cfc870d (diff)
downloadmpv-d24f4587a7cb85e559b06d7a191bb28bbdbf52ad.tar.bz2
mpv-d24f4587a7cb85e559b06d7a191bb28bbdbf52ad.tar.xz
m_option: remove unused error code
The situation in the str_list_* functions can never happen, and they were the only users of this error code.
Diffstat (limited to 'options/m_option.c')
-rw-r--r--options/m_option.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/options/m_option.c b/options/m_option.c
index b8a9f7384c..9bdabd807e 100644
--- a/options/m_option.c
+++ b/options/m_option.c
@@ -67,7 +67,6 @@ char *m_option_strerror(int code)
return "parameter is outside values allowed for option";
case M_OPT_DISALLOW_PARAM:
return "option doesn't take a parameter";
- case M_OPT_PARSER_ERR:
default:
return "parser error";
}
@@ -1109,8 +1108,6 @@ static void free_str_list(void *dst)
static int str_list_add(char **add, int n, void *dst, int pre)
{
- if (!dst)
- return M_OPT_PARSER_ERR;
char **lst = VAL(dst);
int ln;
@@ -1140,8 +1137,6 @@ static int str_list_del(struct mp_log *log, char **del, int n, void *dst)
int i, ln, s;
long idx;
- if (!dst)
- return M_OPT_PARSER_ERR;
lst = VAL(dst);
for (ln = 0; lst && lst[ln]; ln++)