]> granicus.if.org Git - php/commitdiff
fix hash API calls
authorPierre Joye <pierre.php@gmail.com>
Sat, 17 May 2014 06:12:18 +0000 (08:12 +0200)
committerPierre Joye <pierre.php@gmail.com>
Sat, 17 May 2014 06:12:18 +0000 (08:12 +0200)
sapi/apache2filter/apache_config.c

index 7c50b9e6a8960a2bae5ec23e45162a9220a905b3..6de4b3ab364c4baa9f4bad94dbdec478e913cfff 100644 (file)
@@ -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;
        }