Skip to content

Commit c5b344d

Browse files
committed
openssl: Use true / false instead of 1 / 0 for bool parameters
Changes done with Coccinelle: @r1@ identifier F; identifier p; typedef bool; parameter list [n1] PL1; parameter list [n2] PL2; @@ F(PL1, bool p, PL2) { ... } @r2@ identifier r1.F; expression list [r1.n1] EL1; expression list [r1.n2] EL2; @@ F(EL1, ( - 1 + true | - 0 + false ) , EL2)
1 parent 3ef2505 commit c5b344d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/openssl/xp_ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,7 @@ static zend_result php_openssl_setup_crypto(php_stream *stream,
17011701
}
17021702

17031703
if (!SSL_set_fd(sslsock->ssl_handle, sslsock->s.socket)) {
1704-
php_openssl_handle_ssl_error(stream, 0, 1);
1704+
php_openssl_handle_ssl_error(stream, 0, true);
17051705
}
17061706

17071707
#ifdef HAVE_TLS_SNI
@@ -2020,7 +2020,7 @@ static ssize_t php_openssl_sockop_io(int read, php_stream *stream, char *buf, si
20202020

20212021
/* Get the error code from SSL, and check to see if it's an error or not. */
20222022
int err = SSL_get_error(sslsock->ssl_handle, nr_bytes );
2023-
retry = php_openssl_handle_ssl_error(stream, nr_bytes, 0);
2023+
retry = php_openssl_handle_ssl_error(stream, nr_bytes, false);
20242024

20252025
/* If we get this (the above doesn't check) then we'll retry as well. */
20262026
if (errno == EAGAIN && err == SSL_ERROR_WANT_READ && read) {

0 commit comments

Comments
 (0)