[PHP-CVS] [php-src] master: main/output.c: use RETURN_BOOL() when possible

[email protected] (Gina Peter Banyard)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Date: 2026-08-20T18:02:06+01:00

Commit: https://github.com/php/php-src/commit/67348924440293d3bdb61170b59dd52ab6834fde
Raw diff: https://github.com/php/php-src/commit/67348924440293d3bdb61170b59dd52ab6834fde.diff

main/output.c: use RETURN_BOOL() when possible

Changed paths:
  M  main/output.c


Diff:

diff --git a/main/output.c b/main/output.c
index 8221425f5cf6..b717d3d84ada 100644
--- a/main/output.c
+++ b/main/output.c
@@ -1573,11 +1573,7 @@ PHP_FUNCTION(output_reset_rewrite_vars)
 {
 	ZEND_PARSE_PARAMETERS_NONE();
 
-	if (php_url_scanner_reset_vars() == SUCCESS) {
-		RETURN_TRUE;
-	} else {
-		RETURN_FALSE;
-	}
+	RETURN_BOOL(php_url_scanner_reset_vars() == SUCCESS);
 }
 /* }}} */
 
@@ -1591,10 +1587,6 @@ PHP_FUNCTION(output_add_rewrite_var)
 		RETURN_THROWS();
 	}
 
-	if (php_url_scanner_add_var(name, name_len, value, value_len, 1) == SUCCESS) {
-		RETURN_TRUE;
-	} else {
-		RETURN_FALSE;
-	}
+	RETURN_BOOL(php_url_scanner_add_var(name, name_len, value, value_len, 1) == SUCCESS);
 }
 /* }}} */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.