From: Nikita Popov Date: Fri, 15 Jul 2016 21:35:07 +0000 (+0200) Subject: Remove unnecessary use of sxe->tmp X-Git-Tag: php-7.1.0beta1~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c51a2d00b84a4b9996ed73160cdc5e9faebec12;p=php Remove unnecessary use of sxe->tmp --- diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index f1eefa7856..9e7e114554 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1984,12 +1984,8 @@ static int sxe_count_elements(zval *object, zend_long *count) /* {{{ */ zval rv; zend_call_method_with_0_params(object, intern->zo.ce, &intern->fptr_count, "count", &rv); if (!Z_ISUNDEF(rv)) { - if (!Z_ISUNDEF(intern->tmp)) { - zval_ptr_dtor(&intern->tmp); - } - ZVAL_LONG(&intern->tmp, zval_get_long(&rv)); + *count = zval_get_long(&rv); zval_ptr_dtor(&rv); - *count = Z_LVAL(intern->tmp); return SUCCESS; } return FAILURE;