From: Pierre Joye Date: Sat, 17 May 2014 06:12:18 +0000 (+0200) Subject: fix hash API calls X-Git-Tag: POST_PHPNG_MERGE~328^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9eb642a36595afb860d88697e6354f36b71eb6f;p=php fix hash API calls --- diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c index 7c50b9e6a8..6de4b3ab36 100644 --- a/sapi/apache2filter/apache_config.c +++ b/sapi/apache2filter/apache_config.c @@ -137,7 +137,7 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf) zend_hash_move_forward(&d->config)) { pe = NULL; zend_hash_get_current_data(&d->config, (void **) &data); - if (zend_hash_find(&n->config, str, str_len, (void **) &pe) == SUCCESS) { + if ((pe = zend_hash_find(&n->config, str, str_len) != NULL) != NULL) { if (pe->status >= data->status) continue; } zend_hash_update(&n->config, str, str_len, data, sizeof(*data), NULL); @@ -152,7 +152,7 @@ char *get_php_config(void *conf, char *name, size_t name_len) php_conf_rec *d = conf; php_dir_entry *pe; - if (zend_hash_find(&d->config, name, name_len, (void **) &pe) == SUCCESS) { + if ((pe = zend_hash_find(&d->config, name, name_len)) != NULL) { return pe->value; }