diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/spl/spl_array.c | 4 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 4f6efcac7d..57ba65bf8e 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -949,15 +949,13 @@ static int spl_array_compare_objects(zval *o1, zval *o2) /* {{{ */ spl_array_object *intern1, *intern2; int result = 0; - zval temp_zv; intern1 = Z_SPLARRAY_P(o1); intern2 = Z_SPLARRAY_P(o2); ht1 = spl_array_get_hash_table(intern1, 0); ht2 = spl_array_get_hash_table(intern2, 0); - zend_compare_symbol_tables(&temp_zv, ht1, ht2); - result = (int)Z_LVAL(temp_zv); + result = zend_compare_symbol_tables(ht1, ht2); /* if we just compared std.properties, don't do it again */ if (result == 0 && !(ht1 == intern1->std.properties && ht2 == intern2->std.properties)) { diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index cef9c6d967..ed5206aa69 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4937,15 +4937,11 @@ static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_ int ret; if (Z_TYPE_P(func1) == IS_STRING && Z_TYPE_P(func2) == IS_STRING) { - ret = (zend_binary_zval_strcmp(func1, func2) == 0); + ret = zend_binary_zval_strcmp(func1, func2) == 0; } else if (Z_TYPE_P(func1) == IS_ARRAY && Z_TYPE_P(func2) == IS_ARRAY) { - zval result; - zend_compare_arrays(&result, func1, func2); - ret = (Z_LVAL(result) == 0); + ret = zend_compare_arrays(func1, func2) == 0; } else if (Z_TYPE_P(func1) == IS_OBJECT && Z_TYPE_P(func2) == IS_OBJECT) { - zval result; - zend_compare_objects(&result, func1, func2); - ret = (Z_LVAL(result) == 0); + ret = zend_compare_objects(func1, func2) == 0; } else { ret = 0; } |