From: Valentine Krasnobaeva Date: Wed, 22 May 2024 09:19:53 +0000 (+0200) Subject: MINOR: proto: fix coding style X-Git-Tag: v3.0-dev13~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e93549d2a863cb9d2580481451978c0c9b1a488;p=thirdparty%2Fhaproxy.git MINOR: proto: fix coding style Remove redundant brackets for 'if' statements that contain only one instruction. --- diff --git a/src/proto_quic.c b/src/proto_quic.c index 0c4d6558a4..93a24af4b4 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -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 : diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 4e6173c2ee..63be775083 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -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) { diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 94d9170314..7828e31831 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -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)