mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
post-review fixes
server-tools/instance-manager/Makefile.am: Removed entry for deleted file server-tools/instance-manager/buffer.cc: cleanup server-tools/instance-manager/commands.cc: cleanup, added missing error handling server-tools/instance-manager/instance.cc: added waitpid in instance_start, added few checks server-tools/instance-manager/instance_map.cc: error handling for hash_init added server-tools/instance-manager/instance_map.h: Extended constructor server-tools/instance-manager/instance_options.cc: made add_option less bulky server-tools/instance-manager/instance_options.h: - server-tools/instance-manager/listener.cc: added missing close, fixed typo server-tools/instance-manager/manager.cc: moved some Instance_map initialization to costructor server-tools/instance-manager/protocol.cc: error handling added server-tools/instance-manager/protocol.h: store_to_string fixed to return a value server-tools/instance-manager/user_map.cc: error handling for hash_init added server-tools/instance-manager/user_map.h: added init() for User map (becouse of the hash_init check)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user