summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-01 16:53:57 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-03 20:53:10 +0200
commit0214115c7f8007a325cf3466a5bc6680e575a119 (patch)
treedac2fce286c01b68f7ed07d218c185662cc48c7d /sql
parent03dec1aa493517e846b6cecd67e4a9f72a44b92b (diff)
downloadmariadb-git-0214115c7f8007a325cf3466a5bc6680e575a119.tar.gz
trivial cleanup
Diffstat (limited to 'sql')
-rw-r--r--sql/sys_vars.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index 63d3b388a36..bf7ed231d77 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3025,14 +3025,16 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
if (!var->save_result.string_value.str)
return true;
- if (var->save_result.string_value.length > FN_REFLEN)
+ LEX_STRING *val= &var->save_result.string_value;
+
+ if (val->length > FN_REFLEN)
{ // path is too long
my_error(ER_PATH_LENGTH, MYF(0), self->name.str);
return true;
}
char path[FN_REFLEN];
- size_t path_length= unpack_filename(path, var->save_result.string_value.str);
+ size_t path_length= unpack_filename(path, val->str);
if (!path_length)
return true;
@@ -3046,9 +3048,9 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
return false;
}
- (void) dirname_part(path, var->save_result.string_value.str, &path_length);
+ (void) dirname_part(path, val->str, &path_length);
- if (var->save_result.string_value.length - path_length >= FN_LEN)
+ if (val->length - path_length >= FN_LEN)
{ // filename is too long
my_error(ER_PATH_LENGTH, MYF(0), self->name.str);
return true;