Commit b53ee760 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: offsetof instead of my_offsetof

Sys_lc_messages, Sys_lc_time_names: Use offsetof(MY_LOCALE, ...)
because the type has standard layout.
parent 7e7235fa
...@@ -5425,14 +5425,14 @@ static bool update_locale(sys_var *self, THD* thd, enum_var_type type) ...@@ -5425,14 +5425,14 @@ static bool update_locale(sys_var *self, THD* thd, enum_var_type type)
static Sys_var_struct Sys_lc_messages( static Sys_var_struct Sys_lc_messages(
"lc_messages", "Set the language used for the error messages", "lc_messages", "Set the language used for the error messages",
SESSION_VAR(lc_messages), NO_CMD_LINE, SESSION_VAR(lc_messages), NO_CMD_LINE,
my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages), offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_messages),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_locale), ON_UPDATE(update_locale)); NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_locale), ON_UPDATE(update_locale));
static Sys_var_struct Sys_lc_time_names( static Sys_var_struct Sys_lc_time_names(
"lc_time_names", "Set the language used for the month " "lc_time_names", "Set the language used for the month "
"names and the days of the week", "names and the days of the week",
SESSION_VAR(lc_time_names), NO_CMD_LINE, SESSION_VAR(lc_time_names), NO_CMD_LINE,
my_offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names), offsetof(MY_LOCALE, name), DEFAULT(&my_default_lc_time_names),
NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_locale)); NO_MUTEX_GUARD, IN_BINLOG, ON_CHECK(check_locale));
static Sys_var_tz Sys_time_zone( static Sys_var_tz Sys_time_zone(
......
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