summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/m_option.c b/m_option.c
index 62887f4c48..48539b3a4c 100644
--- a/m_option.c
+++ b/m_option.c
@@ -94,23 +94,15 @@ static int parse_flag(const m_option_t *opt, struct bstr name,
struct bstr param, void *dst)
{
if (param.len) {
- char * const enable[] = { "yes", "on", "ja", "si", "igen", "y", "j",
- "i", "tak", "ja", "true", "1" };
- for (int i = 0; i < sizeof(enable) / sizeof(enable[0]); i++) {
- if (!bstrcasecmp0(param, enable[i])) {
- if (dst)
- VAL(dst) = opt->max;
- return 1;
- }
+ if (!bstrcasecmp0(param, "yes")) {
+ if (dst)
+ VAL(dst) = opt->max;
+ return 1;
}
- char * const disable[] = { "no", "off", "nein", "nicht", "nem", "n",
- "nie", "nej", "false", "0" };
- for (int i = 0; i < sizeof(disable) / sizeof(disable[0]); i++) {
- if (!bstrcasecmp0(param, disable[i])) {
- if (dst)
- VAL(dst) = opt->min;
- return 1;
- }
+ if (!bstrcasecmp0(param, "no")) {
+ if (dst)
+ VAL(dst) = opt->min;
+ return 1;
}
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
"Invalid parameter for %.*s flag: %.*s\n",