Commit 518d66e44d for openssl.org

commit 518d66e44d6ffd8fea9344e0ec578c9d5fd8a094
Author: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Date:   Sat Jul 4 11:09:46 2026 +0200

    Remove parentheses around return arguments

    Since return is an operator and not a function, parentheses
    are not required.

    Found by running the checkpatch.pl Linux script to enforce coding style.

    Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
    Reviewed-by: Neil Horman <nhorman@openssl.org>
    Reviewed-by: Norbert Pocs <norbertp@openssl.org>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    MergeDate: Wed Jul  8 10:11:13 2026
    (Merged from https://github.com/openssl/openssl/pull/31860)

diff --git a/apps/lib/vms_term_sock.c b/apps/lib/vms_term_sock.c
index faceb05d01..e60d7f0a1b 100644
--- a/apps/lib/vms_term_sock.c
+++ b/apps/lib/vms_term_sock.c
@@ -495,7 +495,7 @@ static int CreateSocketPair(int SocketFamily,
     SocketPair[0] = SockDesc2;
     SocketPair[1] = socket_fd(TcpDeviceChan);

-    return (0);
+    return 0;
 }

 /*----------------------------------------------------------------------------*/
diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index b839e9d2a2..cdc1826631 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -1084,7 +1084,7 @@ err:
     OPENSSL_clear_free(priv, privlen);
     OPENSSL_free(pub);
     EC_PRIVATEKEY_free(priv_key);
-    return (ok ? ret : 0);
+    return ok ? ret : 0;
 }

 int i2d_ECParameters(const EC_KEY *a, unsigned char **out)
diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c
index 628f89bbdc..78dbe45ce4 100644
--- a/crypto/evp/e_chacha20_poly1305.c
+++ b/crypto/evp/e_chacha20_poly1305.c
@@ -41,7 +41,7 @@ static const EVP_CIPHER chacha20_poly1305 = {

 const EVP_CIPHER *EVP_chacha20_poly1305(void)
 {
-    return (&chacha20_poly1305);
+    return &chacha20_poly1305;
 }
 #endif
 #else
diff --git a/crypto/x509/x509_ext.c b/crypto/x509/x509_ext.c
index 3cd4ac51fc..8c9c5d96bc 100644
--- a/crypto/x509/x509_ext.c
+++ b/crypto/x509/x509_ext.c
@@ -84,7 +84,7 @@ int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos)

 int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos)
 {
-    return (X509v3_get_ext_by_critical(x->cert_info.extensions, crit, lastpos));
+    return X509v3_get_ext_by_critical(x->cert_info.extensions, crit, lastpos);
 }

 const X509_EXTENSION *X509_get_ext(const X509 *x, int loc)
diff --git a/demos/http3/ossl-nghttp3-demo-server.c b/demos/http3/ossl-nghttp3-demo-server.c
index 4529e35268..227ac6e264 100644
--- a/demos/http3/ossl-nghttp3-demo-server.c
+++ b/demos/http3/ossl-nghttp3-demo-server.c
@@ -1035,7 +1035,7 @@ static int wait_for_activity(SSL *ssl)
      * "select" (with updated timeouts).
      */

-    return (select(sock + 1, &read_fd, &write_fd, NULL, tvp));
+    return select(sock + 1, &read_fd, &write_fd, NULL, tvp);
 }

 /* Main loop for server to accept QUIC connections. */
diff --git a/test/http_test.c b/test/http_test.c
index 70f48a4607..d122a45426 100644
--- a/test/http_test.c
+++ b/test/http_test.c
@@ -635,7 +635,7 @@ static int test_hdr_resp_hdr_limit_none(void)

 static int test_hdr_resp_hdr_limit_short(void)
 {
-    return (test_http_resp_hdr_limit(1));
+    return test_http_resp_hdr_limit(1);
 }

 static int test_hdr_resp_hdr_limit_256(void)
diff --git a/test/quic_client_test.c b/test/quic_client_test.c
index 9edf3c18d8..90e8498148 100644
--- a/test/quic_client_test.c
+++ b/test/quic_client_test.c
@@ -172,7 +172,7 @@ err:

 static int test_quic_client(void)
 {
-    return (test_quic_client_ex(INVALID_SOCKET));
+    return test_quic_client_ex(INVALID_SOCKET);
 }

 static int test_quic_client_connect_first(void)
@@ -202,12 +202,12 @@ static int test_quic_client_connect_first(void)

     close(c_fd);

-    return (rv);
+    return rv;

 err:
     if (c_fd != INVALID_SOCKET)
         close(c_fd);
-    return (0);
+    return 0;
 }

 OPT_TEST_DECLARE_USAGE("certfile privkeyfile\n")
diff --git a/test/tls-provider.c b/test/tls-provider.c
index 51db8b138e..6652034936 100644
--- a/test/tls-provider.c
+++ b/test/tls-provider.c
@@ -2598,7 +2598,7 @@ static int xor_get_aid(unsigned char **oidbuf, const char *tls_name)

     aidlen = i2d_X509_ALGOR(algor, oidbuf);
     X509_ALGOR_free(algor);
-    return (aidlen);
+    return aidlen;
 }

 /*