]> granicus.if.org Git - php/commitdiff
make use of zend_atol()
authorAntony Dovgal <tony2001@php.net>
Wed, 19 Mar 2008 12:40:48 +0000 (12:40 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 19 Mar 2008 12:40:48 +0000 (12:40 +0000)
ext/standard/basic_functions.c
main/main.c

index ac61813713b4d7a766bafa19a066d88aabe8da26..df1394f1435fb1353ffdf30d423f476cfed73169 100644 (file)
@@ -6197,7 +6197,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);
index e1ded5d58ad6d217899aa507d0e352d31f990091..18b03fde9e6f4c67aebaa7c55faf676fa8509291 100644 (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 */
        }