Commit c18b7d19 authored by mats@romeo.(none)'s avatar mats@romeo.(none)

Fixing usage of my_strndup() to new prototype.

parent 4044fb8c
......@@ -629,10 +629,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length));
DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length,
table->s->connect_string.str));
share->scheme= my_strndup((const byte*)table->s->
connect_string.str,
table->s->connect_string.length,
MYF(0));
share->scheme= my_strndup(table->s->connect_string.str,
table->s->connect_string.length,
MYF(0));
// Add a null for later termination of table name
share->scheme[table->s->connect_string.length]= 0;
......
......@@ -3175,8 +3175,7 @@ Rotate_log_event::Rotate_log_event(const char* new_log_ident_arg,
llstr(pos_arg, buff), flags));
#endif
if (flags & DUP_NAME)
new_log_ident= my_strndup((const byte*) new_log_ident_arg,
ident_len, MYF(MY_WME));
new_log_ident= my_strndup(new_log_ident_arg, ident_len, MYF(MY_WME));
DBUG_VOID_RETURN;
}
#endif
......@@ -3199,9 +3198,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, uint event_len,
(header_size+post_header_len));
ident_offset = post_header_len;
set_if_smaller(ident_len,FN_REFLEN-1);
new_log_ident= my_strndup((byte*) buf + ident_offset,
(uint) ident_len,
MYF(MY_WME));
new_log_ident= my_strndup(buf + ident_offset, (uint) ident_len, MYF(MY_WME));
DBUG_VOID_RETURN;
}
......
......@@ -1097,7 +1097,7 @@ bool update_sys_var_str(sys_var_str *var_str, rw_lock_t *var_mutex,
uint new_length= (var ? var->value->str_value.length() : 0);
if (!old_value)
old_value= (char*) "";
if (!(res= my_strndup((byte*)old_value, new_length, MYF(0))))
if (!(res= my_strndup(old_value, new_length, MYF(0))))
return 1;
/*
Replace the old value in such a way that the any thread using
......@@ -2632,7 +2632,7 @@ bool update_sys_var_str_path(THD *thd, sys_var_str *var_str,
old_value= make_default_log_name(buff, log_ext);
str_length= strlen(old_value);
}
if (!(res= my_strndup((byte*)old_value, str_length, MYF(MY_FAE+MY_WME))))
if (!(res= my_strndup(old_value, str_length, MYF(MY_FAE+MY_WME))))
{
result= 1;
goto err;
......
......@@ -1055,7 +1055,7 @@ public:
uint name_length_arg, gptr data_arg)
:name_length(name_length_arg), data(data_arg)
{
name= my_strndup((byte*) name_arg, name_length, MYF(MY_WME));
name= my_strndup(name_arg, name_length, MYF(MY_WME));
links->push_back(this);
}
inline bool cmp(const char *name_cmp, uint length)
......
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