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:
@@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user