1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

[standard] Simply if -> RETURN_TRUE/FALSE with RETURN_BOOL() (GH-21147)

This commit is contained in:
Arshid
2026-02-06 14:42:33 +05:30
committed by GitHub
parent 51158bbe90
commit d3e4703310
2 changed files with 4 additions and 13 deletions

View File

@@ -116,11 +116,7 @@ PHP_FUNCTION(dns_check_record)
status = DnsQuery_A(hostname, type, DNS_QUERY_STANDARD, NULL, &pResult, NULL);
if (status) {
RETURN_FALSE;
}
RETURN_TRUE;
RETURN_BOOL(!status);
}
/* }}} */

View File

@@ -1016,10 +1016,8 @@ PHPAPI PHP_FUNCTION(fflush)
ZEND_PARSE_PARAMETERS_END();
ret = php_stream_flush(stream);
if (ret) {
RETURN_FALSE;
}
RETURN_TRUE;
RETURN_BOOL(!ret);
}
/* }}} */
@@ -1032,10 +1030,7 @@ PHPAPI PHP_FUNCTION(rewind)
PHP_Z_PARAM_STREAM(stream)
ZEND_PARSE_PARAMETERS_END();
if (-1 == php_stream_rewind(stream)) {
RETURN_FALSE;
}
RETURN_TRUE;
RETURN_BOOL(-1 != php_stream_rewind(stream));
}
/* }}} */