]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove parentheses around return arguments
authorDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Sat, 4 Jul 2026 09:09:46 +0000 (11:09 +0200)
committerEugene Syromiatnikov <esyr@openssl.org>
Wed, 8 Jul 2026 10:08:25 +0000 (12:08 +0200)
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)

apps/lib/vms_term_sock.c
crypto/ec/ec_asn1.c
crypto/evp/e_chacha20_poly1305.c
crypto/x509/x509_ext.c
demos/http3/ossl-nghttp3-demo-server.c
test/http_test.c
test/quic_client_test.c
test/tls-provider.c

index faceb05d0145177b18cade6e0984e80a4bf2d19e..e60d7f0a1b7f1b563a7ca1ac0628d965dab9d1e8 100644 (file)
@@ -495,7 +495,7 @@ static int CreateSocketPair(int SocketFamily,
     SocketPair[0] = SockDesc2;
     SocketPair[1] = socket_fd(TcpDeviceChan);
 
-    return (0);
+    return 0;
 }
 
 /*----------------------------------------------------------------------------*/
index b839e9d2a27f86d5b8c724e5e3a6d5937e7391f6..cdc182663105797550f85cb9a17af5d9ca093da5 100644 (file)
@@ -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)
index 628f89bbdcfee2d6002f823648ddaa156ef63e49..78dbe45ce44b4c6bf35923663a0979bc2892ac6e 100644 (file)
@@ -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
index 3cd4ac51fc42b679ea224ccdb9507f53ed8b7579..8c9c5d96bcc01ec185519f47af6a6e5dde780141 100644 (file)
@@ -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)
index 4529e35268ff17c8893a180e32a809d82daf280f..227ac6e26487cc34097bd085b482fb31a39510c9 100644 (file)
@@ -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. */
index 70f48a4607ed907d1489d9fd1af4a63746a38e2f..d122a454265f05d6a68bdbc8df29d67681925439 100644 (file)
@@ -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)
index 9edf3c18d858ec49e294d4bb8432a4a128c5255b..90e849814883133d6f74d4337e4ac469f6e3c158 100644 (file)
@@ -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")
index 51db8b138e129168e465ee9879c3606537af5fb3..6652034936c1289be23d21c14a6a4ac8c26c2e78 100644 (file)
@@ -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;
 }
 
 /*