| 2129 | |
| 2130 | |
| 2131 | inline String* alloc_buffer(String *res,String *str,String *tmp_value, |
| 2132 | ulong length) |
| 2133 | { |
| 2134 | if (res->alloced_length() < length) |
| 2135 | { |
| 2136 | if (str->alloced_length() >= length) |
| 2137 | { |
| 2138 | (void) str->copy(*res); |
| 2139 | str->length(length); |
| 2140 | return str; |
| 2141 | } |
| 2142 | if (tmp_value->alloc(length)) |
| 2143 | return 0; |
| 2144 | (void) tmp_value->copy(*res); |
| 2145 | tmp_value->length(length); |
| 2146 | return tmp_value; |
| 2147 | } |
| 2148 | res->length(length); |
| 2149 | return res; |
| 2150 | } |
| 2151 | |
| 2152 | |
| 2153 |
no test coverage detected