]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proto: fix coding style
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 22 May 2024 09:19:53 +0000 (11:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 May 2024 10:00:11 +0000 (12:00 +0200)
Remove redundant brackets for 'if' statements that contain only one
instruction.

src/proto_quic.c
src/proto_tcp.c
src/proto_uxst.c

index 0c4d6558a43565a97638ce9abf8a151ee5e49d56..93a24af4b4f656c394cff77dbada2e362d4c4ed9 100644 (file)
@@ -303,9 +303,8 @@ int quic_connect_server(struct connection *conn, int flags)
 
        /* perform common checks on obtained socket FD, return appropriate Stream Error Flag in case of failure */
        fd = conn->handle.fd = sock_create_server_socket(conn, be, &stream_err);
-       if (fd == -1) {
+       if (fd == -1)
                return stream_err;
-       }
 
        /* FD is ok, perform protocol specific settings */
        /* allow specific binding :
index 4e6173c2ee06abb3e7fb1c71d23759934d9c03f7..63be7750831b48ef282933f621a74c3ef0950339 100644 (file)
@@ -302,9 +302,8 @@ int tcp_connect_server(struct connection *conn, int flags)
 
        /* perform common checks on obtained socket FD, return appropriate Stream Error Flag in case of failure */
        fd = conn->handle.fd = sock_create_server_socket(conn, be, &stream_err);
-       if (fd == -1) {
+       if (fd == -1)
                return stream_err;
-       }
 
        /* FD is OK, continue with protocol specific settings */
        if (be->options & PR_O_TCP_SRV_KA) {
index 94d9170314419e44b5617793799d73ab34eda583..7828e31831db09091468a1a6819ea4f6d08b29e5 100644 (file)
@@ -241,9 +241,8 @@ static int uxst_connect_server(struct connection *conn, int flags)
 
        /* perform common checks on obtained socket FD, return appropriate Stream Error Flag in case of failure */
        fd = conn->handle.fd = sock_create_server_socket(conn, be, &stream_err);
-       if (fd == -1) {
+       if (fd == -1)
                return stream_err;
-       }
 
        /* FD is ok, continue with protocol specific settings */
        if (global.tune.server_sndbuf)