com php-src: Fixed wrong comparisons: main/output.c
| From: | Dmitry Stogov | Date: | Thu, 15 May 2014 17:06:39 +0000 |
| Subject: | com php-src: Fixed wrong comparisons: main/output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78385@lists.php.net to get a copy of this message | ||
Commit: 16d3d5dc536bc461bb6aa88d640efb123ae9fdf4
Author: Dmitry Stogov <dmitry@zend.com> Thu, 15 May 2014 21:06:39 +0400
Parents: 19f6476d197353acb74a2fa0a459afa830a4da6d
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=16d3d5dc536bc461bb6aa88d640efb123ae9fdf4
Log:
Fixed wrong comparisons
Changed paths:
M main/output.c
Diff:
diff --git a/main/output.c b/main/output.c
index d33e418..2531dee 100644
--- a/main/output.c
+++ b/main/output.c
@@ -645,15 +645,15 @@ PHPAPI int php_output_handler_reverse_conflict_register(const char *name,
size_t
return FAILURE;
}
- if (SUCCESS == (rev_ptr = zend_hash_str_find_ptr(&php_output_handler_reverse_conflicts, name,
name_len))) {
+ if (NULL != (rev_ptr = zend_hash_str_find_ptr(&php_output_handler_reverse_conflicts, name,
name_len))) {
return zend_hash_next_index_insert_ptr(rev_ptr, check_func) ? SUCCESS : FAILURE;
} else {
zend_hash_init(&rev, 8, NULL, NULL, 1);
- if (SUCCESS != zend_hash_next_index_insert_ptr(&rev, check_func)) {
+ if (NULL == zend_hash_next_index_insert_ptr(&rev, check_func)) {
zend_hash_destroy(&rev);
return FAILURE;
}
- if (SUCCESS != zend_hash_str_update_mem(&php_output_handler_reverse_conflicts, name,
name_len+1, &rev, sizeof(HashTable))) {
+ if (NULL == zend_hash_str_update_mem(&php_output_handler_reverse_conflicts, name, name_len+1,
&rev, sizeof(HashTable))) {
zend_hash_destroy(&rev);
return FAILURE;
}