From 2c51a2d00b84a4b9996ed73160cdc5e9faebec12 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 15 Jul 2016 23:35:07 +0200 Subject: [PATCH] Remove unnecessary use of sxe->tmp --- ext/simplexml/simplexml.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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; -- 2.50.1