From 9d4af2d544bf5ec93e17712cd5707d921cf53aca Mon Sep 17 00:00:00 2001 From: arshidkv12 Date: Fri, 20 Feb 2026 13:41:27 +0530 Subject: [PATCH] ext/standard: Cleanup boolean return macros --- ext/standard/head.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ext/standard/head.c b/ext/standard/head.c index 76ba89dc01713..797d8d66c56ae 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -260,11 +260,7 @@ static void php_setcookie_common(INTERNAL_FUNCTION_PARAMETERS, bool is_raw) } } - if (php_setcookie(name, value, expires, path, domain, secure, httponly, samesite, partitioned, !is_raw) == SUCCESS) { - RETVAL_TRUE; - } else { - RETVAL_FALSE; - } + RETVAL_BOOL(php_setcookie(name, value, expires, path, domain, secure, httponly, samesite, partitioned, !is_raw) == SUCCESS); if (options) { cleanup: @@ -328,11 +324,7 @@ PHP_FUNCTION(headers_sent) break; } - if (SG(headers_sent)) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } + RETURN_BOOL(SG(headers_sent)); } /* }}} */