com php-src: adjust signature and remove casts: main/main.c
| From: | Anatol Belski | Date: | Fri, 28 Jul 2017 13:07:09 +0000 |
| Subject: | com php-src: adjust signature and remove casts: main/main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98856@lists.php.net to get a copy of this message | ||
Commit: 7b34fae703dbcfdb0e929cb261636653614d610c
Author: Anatol Belski <ab@php.net> Fri, 28 Jul 2017 15:07:09 +0200
Parents: 0d1eeeb68dd692e3905f21a7a11fe04710d9313e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7b34fae703dbcfdb0e929cb261636653614d610c
Log:
adjust signature and remove casts
Changed paths:
M main/main.c
Diff:
diff --git a/main/main.c b/main/main.c
index df95626..6823e6d 100644
--- a/main/main.c
+++ b/main/main.c
@@ -310,7 +310,7 @@ static PHP_INI_MH(OnUpdateTimeout)
/* {{{ php_get_display_errors_mode() helper function
*/
-static int php_get_display_errors_mode(char *value, int value_length)
+static int php_get_display_errors_mode(char *value, size_t value_length)
{
int mode;
@@ -343,7 +343,7 @@ static int php_get_display_errors_mode(char *value, int value_length)
*/
static PHP_INI_MH(OnUpdateDisplayErrors)
{
- PG(display_errors) = (zend_bool) php_get_display_errors_mode(ZSTR_VAL(new_value),
(int)ZSTR_LEN(new_value));
+ PG(display_errors) = (zend_bool) php_get_display_errors_mode(ZSTR_VAL(new_value),
ZSTR_LEN(new_value));
return SUCCESS;
}
@@ -353,15 +353,16 @@ static PHP_INI_MH(OnUpdateDisplayErrors)
*/
static PHP_INI_DISP(display_errors_mode)
{
- int mode, tmp_value_length, cgi_or_cli;
+ int mode, cgi_or_cli;
+ size_t tmp_value_length;
char *tmp_value;
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
tmp_value = (ini_entry->orig_value ? ZSTR_VAL(ini_entry->orig_value) : NULL );
- tmp_value_length = (int)(ini_entry->orig_value? ZSTR_LEN(ini_entry->orig_value) : 0);
+ tmp_value_length = (ini_entry->orig_value? ZSTR_LEN(ini_entry->orig_value) : 0);
} else if (ini_entry->value) {
tmp_value = ZSTR_VAL(ini_entry->value);
- tmp_value_length = (int)ZSTR_LEN(ini_entry->value);
+ tmp_value_length = ZSTR_LEN(ini_entry->value);
} else {
tmp_value = NULL;
tmp_value_length = 0;