1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

post-review fixes

This commit is contained in:
petr@mysql.com
2004-11-02 10:11:03 +03:00
parent e415866cfe
commit d3dc041dd1
13 changed files with 142 additions and 115 deletions

View File

@ -77,7 +77,7 @@ int Buffer::append(uint position, const char *string, uint len_arg)
int Buffer::reserve(uint position, uint len_arg)
{
if (position + len_arg >= MAX_BUFFER_SIZE)
return 1;
goto err;
if (position + len_arg>= buffer_size)
{
@ -85,8 +85,13 @@ int Buffer::reserve(uint position, uint len_arg)
min(MAX_BUFFER_SIZE,
max((uint) (buffer_size*1.5),
position + len_arg)));
if (buffer= NULL)
goto err;
buffer_size= (uint) (buffer_size*1.5);
}
return 0;
err:
return 1;
}