diff options
Diffstat (limited to 'options')
-rw-r--r-- | options/m_option.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/options/m_option.c b/options/m_option.c index 9ec6ccc427..ce86db0696 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -2288,23 +2288,20 @@ bool m_obj_list_find(struct m_obj_desc *dst, const struct m_obj_list *l, if (bstr_equals0(name, dst->name)) return true; } - if (l->aliases) { - for (int i = 0; l->aliases[i][0]; i++) { - const char *aname = l->aliases[i][0]; - const char *alias = l->aliases[i][1]; - const char *opts = l->aliases[i][2]; - if (bstr_equals0(name, aname) && - m_obj_list_find(dst, l, bstr0(alias))) - { - if (opts) { - dst->init_options = opts; - } else { - // Assume it's deprecated in this case. - // Also, it's used by the VO code only, so whatever. - dst->replaced_name = aname; - } - return true; + for (int i = 0; l->aliases[i][0]; i++) { + const char *aname = l->aliases[i][0]; + const char *alias = l->aliases[i][1]; + const char *opts = l->aliases[i][2]; + if (bstr_equals0(name, aname) && m_obj_list_find(dst, l, bstr0(alias))) + { + if (opts) { + dst->init_options = opts; + } else { + // Assume it's deprecated in this case. + // Also, it's used by the VO code only, so whatever. + dst->replaced_name = aname; } + return true; } } return false; |