From 507fa7e2c23623dcbecf20a392ee025002c83866 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 27 Jul 2011 20:59:44 +0300 Subject: options: indicate ambiguous option parameters explicitly Command line options like "-foo xyz" are ambiguous: "xyz" may be a parameter to the option "foo" or an unrelated argument. Instead of relying on the struct m_config mode field (commandline/file) pass parameters to specify ambiguous mode explicitly. Meant for "--foo" options which are never ambiguous on command line either. --- m_property.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'm_property.c') diff --git a/m_property.c b/m_property.c index 0bd01d4cf7..da0f54e2c1 100644 --- a/m_property.c +++ b/m_property.c @@ -108,8 +108,7 @@ int m_property_do(const m_option_t *prop_list, const char *name, if (!arg) return M_PROPERTY_ERROR; val = calloc(1, opt->type->size); - if ((r = - m_option_parse(opt, opt->name, arg, val, M_CONFIG_FILE)) <= 0) { + if ((r = m_option_parse(opt, opt->name, arg, false, val)) <= 0) { free(val); return r; } -- cgit v1.2.3