Re: com php-src: more fixes after merge: ext/mysqlnd/mysqlnd_ps_codec.c
| From: | Andrey Hristov | Date: | Tue, 14 Jan 2014 09:28:20 +0000 |
| Subject: | Re: com php-src: more fixes after merge: ext/mysqlnd/mysqlnd_ps_codec.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-75615@lists.php.net to get a copy of this message | ||
Hi Anatol,
I'm curious why these changes are needed when I am completely sure that 32 bit value will suffice?
Andrey
On 14.01.2014 10:45, Anatol Belski wrote:
Commit: 0c048903541ed7d9e46d4e5ba18a7be1272287d5 Author: Anatol Belski <ab@php.net> Tue, 14 Jan 2014 09:45:46 +0100Parents: 5866c701a2fca1c7cb9225664db2f03ad9987a9f Branches: str_size_and_int64Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0c048903541ed7d9e46d4e5ba18a7be1272287d5Log: more fixes after merge Changed paths: M ext/mysqlnd/mysqlnd_ps_codec.c Diff: diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 1bd1806..ce78d8e 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -521,7 +521,7 @@ static void mysqlnd_stmt_free_copies(MYSQLND_STMT_DATA * stmt, zval ** copies TSRMLS_DC) { if (copies) { - unsigned int i; + php_uint_t i; for (i = 0; i < stmt->param_count; i++) { if (copies[i]) { zval_ptr_dtor(&copies[i]); @@ -666,11 +666,11 @@ mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval ** copies, zend_ static enum_func_status mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval *** copies_param, size_t * data_size TSRMLS_DC) { - unsigned int i; + php_uint_t i; DBG_ENTER("mysqlnd_stmt_execute_calculate_param_values_size"); for (i = 0; i < stmt->param_count; i++) { - zval ** copies; + zval ** copies = NULL; php_uint_t j; zval *the_var = stmt->param_bind[i].zv; @@ -763,7 +763,7 @@ end: static void mysqlnd_stmt_execute_store_param_values(MYSQLND_STMT_DATA * stmt, zval ** copies, zend_uchar ** buf, zend_uchar ** p, size_t null_byte_offset) { - unsigned int i; + php_uint_t i; for (i = 0; i < stmt->param_count; i++) { zval * data = (copies && copies[i])? copies[i]: stmt->param_bind[i].zv; /* Handle long data */ @@ -836,7 +836,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar ** buf, zend_ucha DBG_ENTER("mysqlnd_stmt_execute_store_params"); { - unsigned int null_count = (stmt->param_count + 7) / 8; + php_uint_t null_count = (stmt->param_count + 7) / 8; if (FAIL == mysqlnd_stmt_execute_check_n_enlarge_buffer(buf, p, buf_len, provided_buffer, null_count TSRMLS_CC)) { SET_OOM_ERROR(*stmt->error_info); goto end;