com php-src: Remove unnecessary use of sxe->tmp: ext/simplexml/simplexml.c

From: Date: Sat, 16 Jul 2016 21:16:51 +0000
Subject: com php-src: Remove unnecessary use of sxe->tmp: ext/simplexml/simplexml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93048@lists.php.net to get a copy of this message
Commit: 2c51a2d00b84a4b9996ed73160cdc5e9faebec12 Author: Nikita Popov <nikic@php.net> Fri, 15 Jul 2016 23:35:07 +0200 Parents: 29af302395923de0a701d61172051d3b637744c8 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c51a2d00b84a4b9996ed73160cdc5e9faebec12 Log: Remove unnecessary use of sxe->tmp Changed paths: M ext/simplexml/simplexml.c Diff: diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index f1eefa7..9e7e114 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;

« previous php.cvs (#93048) next »