Commit c0eb4485 authored by unknown's avatar unknown

Added missing (char*) casts in bzero calls.

(Needed for platforms with the traditional bzero prototype.)
Fixes BUG#460.

parent 0b37eae1
...@@ -1710,8 +1710,8 @@ st_relay_log_info::st_relay_log_info() ...@@ -1710,8 +1710,8 @@ st_relay_log_info::st_relay_log_info()
last_slave_error[0]=0; last_slave_error[0]=0;
bzero(&info_file,sizeof(info_file)); bzero((char *)&info_file,sizeof(info_file));
bzero(&cache_buf, sizeof(cache_buf)); bzero((char *)&cache_buf, sizeof(cache_buf));
pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST);
pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST);
pthread_mutex_init(&log_space_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&log_space_lock, MY_MUTEX_INIT_FAST);
......
...@@ -282,7 +282,7 @@ typedef struct st_master_info ...@@ -282,7 +282,7 @@ typedef struct st_master_info
abort_slave(0),slave_running(0), slave_run_id(0) abort_slave(0),slave_running(0), slave_run_id(0)
{ {
host[0] = 0; user[0] = 0; password[0] = 0; host[0] = 0; user[0] = 0; password[0] = 0;
bzero(&file, sizeof(file)); bzero((char *)&file, sizeof(file));
pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST);
pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST);
pthread_cond_init(&data_cond, NULL); pthread_cond_init(&data_cond, NULL);
......
...@@ -275,7 +275,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables) ...@@ -275,7 +275,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
else else
{ {
user.ssl_type=SSL_TYPE_NONE; user.ssl_type=SSL_TYPE_NONE;
bzero(&(user.user_resource),sizeof(user.user_resource)); bzero((char *)&(user.user_resource),sizeof(user.user_resource));
#ifndef TO_BE_REMOVED #ifndef TO_BE_REMOVED
if (table->fields <= 13) if (table->fields <= 13)
{ // Without grant { // Without grant
...@@ -506,7 +506,7 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, ...@@ -506,7 +506,7 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
*priv_user=(char*) user; *priv_user=(char*) user;
DBUG_ENTER("acl_getroot"); DBUG_ENTER("acl_getroot");
bzero(mqh,sizeof(USER_RESOURCES)); bzero((char *)mqh,sizeof(USER_RESOURCES));
if (!initialized) if (!initialized)
{ {
// If no data allow anything // If no data allow anything
......
...@@ -152,7 +152,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length) ...@@ -152,7 +152,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length)
lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE); lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE);
lex->slave_thd_opt=0; lex->slave_thd_opt=0;
lex->sql_command=SQLCOM_END; lex->sql_command=SQLCOM_END;
bzero(&lex->mi,sizeof(lex->mi)); bzero((char *)&lex->mi,sizeof(lex->mi));
return lex; return lex;
} }
......
...@@ -3685,7 +3685,7 @@ grant: ...@@ -3685,7 +3685,7 @@ grant:
lex->select->db= 0; lex->select->db= 0;
lex->ssl_type= SSL_TYPE_NOT_SPECIFIED; lex->ssl_type= SSL_TYPE_NOT_SPECIFIED;
lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0; lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
bzero(&(lex->mqh),sizeof(lex->mqh)); bzero((char *)&(lex->mqh),sizeof(lex->mqh));
} }
grant_privileges ON opt_table TO_SYM user_list grant_privileges ON opt_table TO_SYM user_list
require_clause grant_options require_clause grant_options
......
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