From: Andrey Hristov Date: Fri, 17 Jan 2003 16:33:01 +0000 (+0000) Subject: Removed pointless checks around array_init(). X-Git-Tag: PHP_5_0_dev_before_13561_fix~173 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7dd7b03aa8f314369f7c490e6b4370920b0eca61;p=php Removed pointless checks around array_init(). --- diff --git a/ext/swf/swf.c b/ext/swf/swf.c index d3143c375b..828a1cf1bd 100644 --- a/ext/swf/swf.c +++ b/ext/swf/swf.c @@ -908,10 +908,8 @@ PHP_FUNCTION(swf_getfontinfo) { float A_height, x_height; swf_getfontinfo(&A_height, &x_height); - if (array_init(return_value) == FAILURE) { - php_error(E_WARNING, "Cannot initialize return value from swf_getfontinfo"); - RETURN_FALSE; - } + + array_init(return_value); add_assoc_double(return_value, "Aheight", A_height); add_assoc_double(return_value, "xheight", x_height); } @@ -978,10 +976,8 @@ PHP_FUNCTION(swf_getbitmapinfo) convert_to_long_ex(bitmapid); size = swf_getbitmapinfo(Z_LVAL_PP(bitmapid), &width, &height); - if (array_init(return_value) == FAILURE) { - php_error(E_WARNING, "Cannot initialize return value from swf_getbitmapinfo"); - RETURN_FALSE; - } + + array_init(return_value); add_assoc_long(return_value, "size", size); add_assoc_long(return_value, "width", width);