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

index 8a9faed61511fd0470bbcd526dfa129378978534..d4737654a4bb8a2d7e9b4e1e3bb8e473834b0038 100644 (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);
index e86ca796b3b08614b33709296e7f24af1b5bc6c6..47a54cc5feb135021677a1479a339b9d80eff2d9 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 */
        }