mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-25 11:11:53 +00:00
MRT Table Dump: Bugfix buffer memory reallocation
This commit is contained in:
parent
f7385b42a4
commit
0722998578
@ -42,7 +42,7 @@ mrt_buffer_free(struct mrt_buffer *buf)
|
|||||||
static void
|
static void
|
||||||
mrt_buffer_enlarge(struct mrt_buffer *buf, size_t min_required_capacity)
|
mrt_buffer_enlarge(struct mrt_buffer *buf, size_t min_required_capacity)
|
||||||
{
|
{
|
||||||
if (min_required_capacity < buf->msg_capacity)
|
if (min_required_capacity > buf->msg_capacity)
|
||||||
{
|
{
|
||||||
buf->msg_capacity *= 2;
|
buf->msg_capacity *= 2;
|
||||||
if (min_required_capacity > buf->msg_capacity)
|
if (min_required_capacity > buf->msg_capacity)
|
||||||
|
Loading…
Reference in New Issue
Block a user