@@ -1398,6 +1398,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, info)(const MYSQLND_CONN_DATA * const conn)
1398
1398
}
1399
1399
/* }}} */
1400
1400
1401
+
1401
1402
/* {{{ mysqlnd_get_client_info */
1402
1403
PHPAPI const char * mysqlnd_get_client_info ()
1403
1404
{
@@ -1821,7 +1822,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_client_option)(MYSQLND_CONN_DATA * const c
1821
1822
/* {{{ mysqlnd_conn_data::set_client_option_2d */
1822
1823
static enum_func_status
1823
1824
MYSQLND_METHOD (mysqlnd_conn_data , set_client_option_2d )(MYSQLND_CONN_DATA * const conn ,
1824
- enum_mysqlnd_client_option option ,
1825
+ const enum_mysqlnd_client_option option ,
1825
1826
const char * const key ,
1826
1827
const char * const value
1827
1828
)
@@ -2481,9 +2482,10 @@ MYSQLND_CLASS_METHODS_END;
2481
2482
#include "php_network.h"
2482
2483
2483
2484
/* {{{ mysqlnd_stream_array_to_fd_set */
2484
- MYSQLND * * mysqlnd_stream_array_check_for_readiness (MYSQLND * * conn_array )
2485
+ MYSQLND * *
2486
+ mysqlnd_stream_array_check_for_readiness (MYSQLND * * conn_array )
2485
2487
{
2486
- int cnt = 0 ;
2488
+ unsigned int cnt = 0 ;
2487
2489
MYSQLND * * p = conn_array , * * p_p ;
2488
2490
MYSQLND * * ret = NULL ;
2489
2491
@@ -2517,7 +2519,8 @@ MYSQLND ** mysqlnd_stream_array_check_for_readiness(MYSQLND ** conn_array)
2517
2519
2518
2520
2519
2521
/* {{{ mysqlnd_stream_array_to_fd_set */
2520
- static int mysqlnd_stream_array_to_fd_set (MYSQLND * * conn_array , fd_set * fds , php_socket_t * max_fd )
2522
+ static unsigned int
2523
+ mysqlnd_stream_array_to_fd_set (MYSQLND * * conn_array , fd_set * fds , php_socket_t * max_fd )
2521
2524
{
2522
2525
php_socket_t this_fd ;
2523
2526
php_stream * stream = NULL ;
@@ -2533,29 +2536,32 @@ static int mysqlnd_stream_array_to_fd_set(MYSQLND ** conn_array, fd_set * fds, p
2533
2536
* */
2534
2537
stream = (* p )-> data -> vio -> data -> m .get_stream ((* p )-> data -> vio );
2535
2538
DBG_INF_FMT ("conn=%llu stream=%p" , (* p )-> data -> thread_id , stream );
2536
- if (stream != NULL && SUCCESS == php_stream_cast (stream , PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL ,
2537
- (void * )& this_fd , 1 ) && ZEND_VALID_SOCKET (this_fd )) {
2539
+ if (stream != NULL &&
2540
+ SUCCESS == php_stream_cast (stream , PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL , (void * )& this_fd , 1 ) &&
2541
+ ZEND_VALID_SOCKET (this_fd ))
2542
+ {
2538
2543
2539
2544
PHP_SAFE_FD_SET (this_fd , fds );
2540
2545
2541
2546
if (this_fd > * max_fd ) {
2542
2547
* max_fd = this_fd ;
2543
2548
}
2544
- cnt ++ ;
2549
+ ++ cnt ;
2545
2550
}
2546
- p ++ ;
2551
+ ++ p ;
2547
2552
}
2548
2553
DBG_RETURN (cnt ? 1 : 0 );
2549
2554
}
2550
2555
/* }}} */
2551
2556
2552
2557
2553
2558
/* {{{ mysqlnd_stream_array_from_fd_set */
2554
- static int mysqlnd_stream_array_from_fd_set (MYSQLND * * conn_array , fd_set * fds )
2559
+ static unsigned int
2560
+ mysqlnd_stream_array_from_fd_set (MYSQLND * * conn_array , fd_set * fds )
2555
2561
{
2556
2562
php_socket_t this_fd ;
2557
2563
php_stream * stream = NULL ;
2558
- int ret = 0 ;
2564
+ unsigned int ret = 0 ;
2559
2565
zend_bool disproportion = FALSE;
2560
2566
MYSQLND * * fwd = conn_array , * * bckwd = conn_array ;
2561
2567
DBG_ENTER ("mysqlnd_stream_array_from_fd_set" );
@@ -2569,14 +2575,14 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND ** conn_array, fd_set * fds)
2569
2575
if (disproportion ) {
2570
2576
* bckwd = * fwd ;
2571
2577
}
2572
- bckwd ++ ;
2573
- fwd ++ ;
2574
- ret ++ ;
2578
+ ++ bckwd ;
2579
+ ++ fwd ;
2580
+ ++ ret ;
2575
2581
continue ;
2576
2582
}
2577
2583
}
2578
2584
disproportion = TRUE;
2579
- fwd ++ ;
2585
+ ++ fwd ;
2580
2586
}
2581
2587
* bckwd = NULL ;/* NULL-terminate the list */
2582
2588
0 commit comments