From 0e93549d2a863cb9d2580481451978c0c9b1a488 Mon Sep 17 00:00:00 2001 From: Valentine Krasnobaeva Date: Wed, 22 May 2024 11:19:53 +0200 Subject: [PATCH] MINOR: proto: fix coding style Remove redundant brackets for 'if' statements that contain only one instruction. --- src/proto_quic.c | 3 +-- src/proto_tcp.c | 3 +-- src/proto_uxst.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/proto_quic.c b/src/proto_quic.c index 0c4d6558a..93a24af4b 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 4e6173c2e..63be77508 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 94d917031..7828e3183 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) -- 2.47.3