diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/comp_err.c | 24 | ||||
-rw-r--r-- | extra/my_print_defaults.c | 2 | ||||
-rw-r--r-- | extra/replace.c | 22 |
3 files changed, 24 insertions, 24 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c index 53d8c18262b..c85aef7bcc5 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -387,15 +387,15 @@ static void clean_up(struct languages *lang_head, struct errors *error_head) struct errors *tmp_error, *next_error; uint count, i; - my_free((uchar*) default_language, MYF(0)); + my_free((void*) default_language); for (tmp_lang= lang_head; tmp_lang; tmp_lang= next_language) { next_language= tmp_lang->next_lang; - my_free(tmp_lang->lang_short_name, MYF(0)); - my_free(tmp_lang->lang_long_name, MYF(0)); - my_free(tmp_lang->charset, MYF(0)); - my_free((uchar*) tmp_lang, MYF(0)); + my_free(tmp_lang->lang_short_name); + my_free(tmp_lang->lang_long_name); + my_free(tmp_lang->charset); + my_free(tmp_lang); } for (tmp_error= error_head; tmp_error; tmp_error= next_error) @@ -406,17 +406,17 @@ static void clean_up(struct languages *lang_head, struct errors *error_head) { struct message *tmp; tmp= dynamic_element(&tmp_error->msg, i, struct message*); - my_free((uchar*) tmp->lang_short_name, MYF(0)); - my_free((uchar*) tmp->text, MYF(0)); + my_free(tmp->lang_short_name); + my_free(tmp->text); } delete_dynamic(&tmp_error->msg); if (tmp_error->sql_code1[0]) - my_free((uchar*) tmp_error->sql_code1, MYF(0)); + my_free((void*) tmp_error->sql_code1); if (tmp_error->sql_code2[0]) - my_free((uchar*) tmp_error->sql_code2, MYF(0)); - my_free((uchar*) tmp_error->er_name, MYF(0)); - my_free((uchar*) tmp_error, MYF(0)); + my_free((void*) tmp_error->sql_code2); + my_free((void*) tmp_error->er_name); + my_free(tmp_error); } } @@ -559,7 +559,7 @@ static uint parse_error_offset(char *str) end= 0; ioffset= (uint) my_strtoll10(soffset, &end, &error); - my_free((uchar*) soffset, MYF(0)); + my_free(soffset); DBUG_RETURN(ioffset); } diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 9595e1b2df8..81416df2922 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -200,7 +200,7 @@ int main(int argc, char **argv) for (argument= arguments+1 ; *argument ; argument++) if (*argument != args_separator) /* skip arguments separator */ puts(*argument); - my_free((char*) load_default_groups,MYF(0)); + my_free(load_default_groups); free_defaults(arguments); exit(0); diff --git a/extra/replace.c b/extra/replace.c index 3f07183807c..1a887ac3e21 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -262,7 +262,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name) if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD), MYF(MY_WME)))) { - my_free((uchar*) pa->typelib.type_names,MYF(0)); + my_free(pa->typelib.type_names); DBUG_RETURN (-1); } pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+ @@ -324,9 +324,9 @@ static void free_pointer_array(reg1 POINTER_ARRAY *pa) if (pa->typelib.count) { pa->typelib.count=0; - my_free((uchar*) pa->typelib.type_names,MYF(0)); + my_free(pa->typelib.type_names); pa->typelib.type_names=0; - my_free((uchar*) pa->str,MYF(0)); + my_free(pa->str); } return; } /* free_pointer_array */ @@ -441,7 +441,7 @@ static REPLACE *init_replace(char * *from, char * *to,uint count, if (!(follow=(FOLLOWS*) my_malloc((states+2)*sizeof(FOLLOWS),MYF(MY_WME)))) { free_sets(&sets); - my_free((uchar*) found_set,MYF(0)); + my_free(found_set); DBUG_RETURN(0); } @@ -663,9 +663,9 @@ static REPLACE *init_replace(char * *from, char * *to,uint count, replace[i].next[j]=(REPLACE*) (rep_str+(-sets.set[i].next[j]-1)); } } - my_free((uchar*) follow,MYF(0)); + my_free(follow); free_sets(&sets); - my_free((uchar*) found_set,MYF(0)); + my_free(found_set); DBUG_PRINT("exit",("Replace table has %d states",sets.count)); DBUG_RETURN(replace); } @@ -681,7 +681,7 @@ static int init_sets(REP_SETS *sets,uint states) if (!(sets->bit_buffer=(uint*) my_malloc(sizeof(uint)*sets->size_of_bits* SET_MALLOC_HUNC,MYF(MY_WME)))) { - my_free((uchar*) sets->set,MYF(0)); + my_free(sets->set); return 1; } return 0; @@ -742,8 +742,8 @@ static void free_last_set(REP_SETS *sets) static void free_sets(REP_SETS *sets) { - my_free((uchar*)sets->set_buffer,MYF(0)); - my_free((uchar*)sets->bit_buffer,MYF(0)); + my_free(sets->set_buffer); + my_free(sets->bit_buffer); return; } @@ -950,8 +950,8 @@ static void reset_buffer() static void free_buffer() { - my_free(buffer,MYF(MY_WME)); - my_free(out_buff,MYF(MY_WME)); + my_free(buffer); + my_free(out_buff); } |