diff options
Diffstat (limited to 'ext/mysqlnd/php_mysqlnd.c')
-rw-r--r-- | ext/mysqlnd/php_mysqlnd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index e0bc6d126d..95747a7e3a 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -138,11 +138,11 @@ PHP_MINFO_FUNCTION(mysqlnd) #else "not supported"); #endif - snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_cmd_buffer_size)); + snprintf(buf, sizeof(buf), "%pd", MYSQLND_G(net_cmd_buffer_size)); php_info_print_table_row(2, "Command buffer size", buf); - snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_read_buffer_size)); + snprintf(buf, sizeof(buf), "%pd", MYSQLND_G(net_read_buffer_size)); php_info_print_table_row(2, "Read buffer size", buf); - snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_read_timeout)); + snprintf(buf, sizeof(buf), "%pd", MYSQLND_G(net_read_timeout)); php_info_print_table_row(2, "Read timeout", buf); php_info_print_table_row(2, "Collecting statistics", MYSQLND_G(collect_statistics)? "Yes":"No"); php_info_print_table_row(2, "Collecting memory statistics", MYSQLND_G(collect_memory_statistics)? "Yes":"No"); @@ -206,7 +206,9 @@ static PHP_GINIT_FUNCTION(mysqlnd) */ static PHP_INI_MH(OnUpdateNetCmdBufferSize) { - long long_value = atol(new_value); + php_int_t long_value; + + ZEND_ATOI(long_value, new_value); if (long_value < MYSQLND_NET_CMD_BUFFER_MIN_SIZE) { return FAILURE; } |