Skip to content

Commit e5edab2

Browse files
committed
main/output.c: use RETURN_BOOL() when possible
1 parent d9f3ba6 commit e5edab2

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

main/output.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,11 +1577,7 @@ PHP_FUNCTION(output_reset_rewrite_vars)
15771577
{
15781578
ZEND_PARSE_PARAMETERS_NONE();
15791579

1580-
if (php_url_scanner_reset_vars() == SUCCESS) {
1581-
RETURN_TRUE;
1582-
} else {
1583-
RETURN_FALSE;
1584-
}
1580+
RETURN_BOOL(php_url_scanner_reset_vars() == SUCCESS);
15851581
}
15861582
/* }}} */
15871583

@@ -1595,10 +1591,6 @@ PHP_FUNCTION(output_add_rewrite_var)
15951591
RETURN_THROWS();
15961592
}
15971593

1598-
if (php_url_scanner_add_var(name, name_len, value, value_len, 1) == SUCCESS) {
1599-
RETURN_TRUE;
1600-
} else {
1601-
RETURN_FALSE;
1602-
}
1594+
RETURN_BOOL(php_url_scanner_add_var(name, name_len, value, value_len, 1) == SUCCESS);
16031595
}
16041596
/* }}} */

0 commit comments

Comments
 (0)