@@ -322,10 +322,8 @@ static void php_libxml_node_free(xmlNodePtr node)
322
322
323
323
PHP_LIBXML_API void php_libxml_node_free_list (xmlNodePtr node )
324
324
{
325
- xmlNodePtr curnode ;
326
-
327
325
if (node != NULL ) {
328
- curnode = node ;
326
+ xmlNodePtr curnode = node ;
329
327
while (curnode != NULL ) {
330
328
/* If the _private field is set, there's still a userland reference somewhere. We'll delay freeing in this case. */
331
329
if (curnode -> _private ) {
@@ -1157,13 +1155,11 @@ PHP_FUNCTION(libxml_get_last_error)
1157
1155
/* {{{ Retrieve array of errors */
1158
1156
PHP_FUNCTION (libxml_get_errors )
1159
1157
{
1160
- xmlErrorPtr error ;
1161
-
1162
1158
ZEND_PARSE_PARAMETERS_NONE ();
1163
1159
1164
1160
if (LIBXML (error_list )) {
1165
1161
array_init (return_value );
1166
- error = zend_llist_get_first (LIBXML (error_list ));
1162
+ xmlErrorPtr error = zend_llist_get_first (LIBXML (error_list ));
1167
1163
1168
1164
while (error != NULL ) {
1169
1165
zval z_error ;
@@ -1285,16 +1281,15 @@ zval *php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node ex
1285
1281
1286
1282
PHP_LIBXML_API xmlNodePtr php_libxml_import_node (zval * object )
1287
1283
{
1288
- zend_class_entry * ce = NULL ;
1289
1284
xmlNodePtr node = NULL ;
1290
- php_libxml_func_handler * export_hnd ;
1291
1285
1292
1286
if (Z_TYPE_P (object ) == IS_OBJECT ) {
1293
- ce = Z_OBJCE_P (object );
1287
+ zend_class_entry * ce = Z_OBJCE_P (object );
1294
1288
while (ce -> parent != NULL ) {
1295
1289
ce = ce -> parent ;
1296
1290
}
1297
- if ((export_hnd = zend_hash_find_ptr (& php_libxml_exports , ce -> name ))) {
1291
+ php_libxml_func_handler * export_hnd = zend_hash_find_ptr (& php_libxml_exports , ce -> name );
1292
+ if (export_hnd ) {
1298
1293
node = export_hnd -> export_func (object );
1299
1294
}
1300
1295
}
0 commit comments