Commit 53582238 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove convert_dash_to_underscore

it was a no-op, plugin variables don't have dashes
parent df10a945
......@@ -134,15 +134,6 @@ double getopt_double_limit_value(double num, const struct my_option *optp,
ulonglong getopt_double2ulonglong(double);
double getopt_ulonglong2double(ulonglong);
static inline void convert_dash_to_underscore(char *str, size_t len)
{
for (char *p= str; p <= str+len; p++)
if (*p == '-')
*p= '_';
else if (*p != '_' && isalnum(*p) == 0)
break;
}
static inline void convert_underscore_to_dash(char *str, size_t len)
{
for (char *p= str; p <= str+len; p++)
......
......@@ -4220,10 +4220,9 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
var= NULL;
len= tmp->name.length + strlen(o->name) + 2;
varname= (char*) alloc_root(mem_root, len);
strxmov(varname, tmp->name.str, "-", o->name, NullS);
strxmov(varname, tmp->name.str, "_", o->name, NullS);
// Ok to use latin1, as the variable name is pure ASCII
my_casedn_str_latin1(varname);
convert_dash_to_underscore(varname, len-1);
}
if (o->flags & PLUGIN_VAR_NOSYSVAR)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment