Skip to content

Commit 2807c36

Browse files
committed
ext/standard/head.c: use RETURN_BOOL() when possible
1 parent 468e587 commit 2807c36

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

ext/standard/head.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,7 @@ static void php_setcookie_common(INTERNAL_FUNCTION_PARAMETERS, bool is_raw)
260260
}
261261
}
262262

263-
if (php_setcookie(name, value, expires, path, domain, secure, httponly, samesite, partitioned, !is_raw) == SUCCESS) {
264-
RETVAL_TRUE;
265-
} else {
266-
RETVAL_FALSE;
267-
}
263+
RETVAL_BOOL(php_setcookie(name, value, expires, path, domain, secure, httponly, samesite, partitioned, !is_raw) == SUCCESS);
268264

269265
if (options) {
270266
cleanup:
@@ -328,11 +324,7 @@ PHP_FUNCTION(headers_sent)
328324
break;
329325
}
330326

331-
if (SG(headers_sent)) {
332-
RETURN_TRUE;
333-
} else {
334-
RETURN_FALSE;
335-
}
327+
RETURN_BOOL(SG(headers_sent));
336328
}
337329
/* }}} */
338330

0 commit comments

Comments
 (0)