From e873d703e956d3e2e68b9e18562983b029b5c7a8 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 28 Jul 2011 11:07:47 +0300 Subject: options: change option parsing to use bstr Using bstr allows simpler parsing code, especially because it avoids the need to modify or copy strings just to terminate extracted substrings. --- m_property.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'm_property.c') diff --git a/m_property.c b/m_property.c index da0f54e2c1..188d225bad 100644 --- a/m_property.c +++ b/m_property.c @@ -108,7 +108,8 @@ 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, false, val)) <= 0) { + if ((r = m_option_parse(opt, bstr(opt->name), bstr(arg), false, + val)) <= 0) { free(val); return r; } -- cgit v1.2.3