1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00

MFH: make use of zend_atol()

This commit is contained in:
Antony Dovgal
2008-03-19 12:42:16 +00:00
parent 7b1bc753c6
commit e3b672bb23
2 changed files with 2 additions and 2 deletions

View File

@@ -6128,7 +6128,7 @@ static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int cal
}
if (!(Z_STRLEN_P(arg1) > 1 && Z_STRVAL_P(arg1)[0] == '0') && is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == IS_LONG) {
ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
ulong key = (ulong) zend_atol(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
if (zend_hash_index_find(Z_ARRVAL_P(arr), key, (void **) &find_hash) == FAILURE) {
ALLOC_ZVAL(hash);
INIT_PZVAL(hash);

View File

@@ -118,7 +118,7 @@ static PHP_INI_MH(OnSetPrecision)
static PHP_INI_MH(OnChangeMemoryLimit)
{
if (new_value) {
PG(memory_limit) = zend_atoi(new_value, new_value_length);
PG(memory_limit) = zend_atol(new_value, new_value_length);
} else {
PG(memory_limit) = 1<<30; /* effectively, no limit */
}