| 73 | |
| 74 | |
| 75 | my_bool dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size) |
| 76 | { |
| 77 | DBUG_ENTER("dynstr_realloc"); |
| 78 | |
| 79 | if (!additional_size) DBUG_RETURN(FALSE); |
| 80 | if (str->length + additional_size > str->max_length) |
| 81 | { |
| 82 | str->max_length=((str->length + additional_size+str->alloc_increment-1)/ |
| 83 | str->alloc_increment)*str->alloc_increment; |
| 84 | if (!(str->str=(char*) my_realloc(str->str,str->max_length,MYF(MY_WME)))) |
| 85 | DBUG_RETURN(TRUE); |
| 86 | } |
| 87 | DBUG_RETURN(FALSE); |
| 88 | } |
| 89 | |
| 90 | |
| 91 | my_bool dynstr_append(DYNAMIC_STRING *str, const char *append) |
nothing calls this directly
no test coverage detected