mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
pfc & vio init methods cannot fail
These methods cannot fail the way they are currently designed. They only call set_client_option which could fail only with wrong arguments. Since this is an internal call, the arguments should never change. Either way set_client_option should not cause init to fail.
This commit is contained in:
parent
ee510eed68
commit
45607225ea
4 changed files with 8 additions and 14 deletions
|
@ -438,7 +438,7 @@ MYSQLND_METHOD(mysqlnd_pfc, free_contents)(MYSQLND_PFC * pfc)
|
|||
|
||||
|
||||
/* {{{ mysqlnd_pfc::init */
|
||||
static enum_func_status
|
||||
static void
|
||||
MYSQLND_METHOD(mysqlnd_pfc, init)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const stats, MYSQLND_ERROR_INFO * const error_info)
|
||||
{
|
||||
unsigned int buf_size;
|
||||
|
@ -447,7 +447,7 @@ MYSQLND_METHOD(mysqlnd_pfc, init)(MYSQLND_PFC * const pfc, MYSQLND_STATS * const
|
|||
buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/
|
||||
pfc->data->m.set_client_option(pfc, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size);
|
||||
|
||||
DBG_RETURN(PASS);
|
||||
DBG_VOID_RETURN;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue