~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/rpl_rli.cc

Removing redundant use of casts in drizzled/ for memcmp(), memcpy(), memset(), and memmove().
Adding non-const version of String::ptr() to provide covariance on const:ness.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
  group_relay_log_name[0]= event_relay_log_name[0]=
49
49
    group_master_log_name[0]= 0;
50
50
  until_log_name[0]= ign_master_log_name_end[0]= 0;
51
 
  memset((char*) &info_file, 0, sizeof(info_file));
52
 
  memset((char*) &cache_buf, 0, sizeof(cache_buf));
 
51
  memset(&info_file, 0, sizeof(info_file));
 
52
  memset(&cache_buf, 0, sizeof(cache_buf));
53
53
  cached_charset_invalidate();
54
54
  pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST);
55
55
  pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST);
985
985
 
986
986
bool Relay_log_info::cached_charset_compare(char *charset) const
987
987
{
988
 
  if (memcmp((uchar*) cached_charset, (uchar*) charset,
989
 
             sizeof(cached_charset)))
 
988
  if (memcmp(cached_charset, charset, sizeof(cached_charset)))
990
989
  {
991
990
    memcpy(const_cast<char*>(cached_charset), charset, sizeof(cached_charset));
992
991
    return(1);