提交 aa2d884d authored 作者: Anthony Minessale's avatar Anthony Minessale

tweak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3916 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 26c18bb1
...@@ -64,16 +64,13 @@ SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle ...@@ -64,16 +64,13 @@ SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle
if ((remaining < need) && handle->alloc_len) { if ((remaining < need) && handle->alloc_len) {
switch_size_t new_len; switch_size_t new_len;
void *new_data;
if (need < handle->alloc_chunk) { new_len = handle->data_size + need + handle->alloc_chunk;
need = handle->alloc_chunk; if ((new_data = realloc(handle->data, new_len))) {
}
new_len = handle->data_size + need;
if ((handle->data = realloc(handle->data, new_len))) {
handle->data_size = handle->alloc_len = new_len; handle->data_size = handle->alloc_len = new_len;
handle->data = new_data;
buf = handle->data; buf = handle->data;
remaining = handle->data_size - handle->data_len; remaining = handle->data_size - handle->data_len;
handle->end = (uint8_t *)(handle->data) + handle->data_len; handle->end = (uint8_t *)(handle->data) + handle->data_len;
end = handle->end; end = handle->end;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论