diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-06-01 11:58:57 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-06-01 11:58:57 +0300 |
commit | 0b90cf85a6ace22abd0f9f86d5015a5b6db92387 (patch) | |
tree | e01be0712ad1d7dbcd61c81ce03b9544a69e4972 /ext/xmlrpc/xmlrpc-epi-php.c | |
parent | 9e0f131d2b0e8bf98859c12104a7b0cd8951c135 (diff) | |
download | php-git-0b90cf85a6ace22abd0f9f86d5015a5b6db92387.tar.gz |
Removed "dead" code (zend_hash_update() never fails)
Diffstat (limited to 'ext/xmlrpc/xmlrpc-epi-php.c')
-rw-r--r-- | ext/xmlrpc/xmlrpc-epi-php.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index 0a35c5ea3f..6fbb66ddc5 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -1285,9 +1285,8 @@ int set_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE newtype) /* {{{ */ ZVAL_LONG(&ztimestamp, timestamp); convert_to_object(value); - if (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type)) { - bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_VALUE_TS_ATTR, sizeof(OBJECT_VALUE_TS_ATTR) - 1, &ztimestamp) != NULL)? SUCCESS : FAILURE; - } + zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type); + bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_VALUE_TS_ATTR, sizeof(OBJECT_VALUE_TS_ATTR) - 1, &ztimestamp) != NULL)? SUCCESS : FAILURE; } else { zval_ptr_dtor(&type); } @@ -1297,7 +1296,8 @@ int set_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE newtype) /* {{{ */ } } else { convert_to_object(value); - bSuccess = (zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type) != NULL)? SUCCESS : FAILURE; + zend_hash_str_update(Z_OBJPROP_P(value), OBJECT_TYPE_ATTR, sizeof(OBJECT_TYPE_ATTR) - 1, &type); + bSuccess = SUCCESS; } } } |