From 8fe2a4285cb0e3742f2935455c93c3dcaf965451 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 23 Nov 2016 20:05:59 -0800 Subject: [PATCH] clang-format --- test/core/util/port_posix.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 1cb4a8c05fd..4a42e4c7021 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -127,9 +127,9 @@ static bool is_port_available(int *port, bool is_tcp) { on each supported family. */ bool got_socket = false; for (int is_ipv6 = 1; is_ipv6 >= 0; is_ipv6--) { - const int fd = socket(is_ipv6 ? AF_INET6 : AF_INET, - is_tcp ? SOCK_STREAM : SOCK_DGRAM, - is_tcp ? IPPROTO_TCP : 0); + const int fd = + socket(is_ipv6 ? AF_INET6 : AF_INET, is_tcp ? SOCK_STREAM : SOCK_DGRAM, + is_tcp ? IPPROTO_TCP : 0); if (fd >= 0) { got_socket = true; } else { @@ -147,9 +147,9 @@ static bool is_port_available(int *port, bool is_tcp) { /* Try binding to port */ grpc_resolved_address addr; if (is_ipv6) { - grpc_sockaddr_make_wildcard6(*port, &addr); /* [::]:port */ + grpc_sockaddr_make_wildcard6(*port, &addr); /* [::]:port */ } else { - grpc_sockaddr_make_wildcard4(*port, &addr); /* 0.0.0.0:port */ + grpc_sockaddr_make_wildcard4(*port, &addr); /* 0.0.0.0:port */ } if (bind(fd, (struct sockaddr *)addr.addr, (socklen_t)addr.len) < 0) { gpr_log(GPR_DEBUG, "bind(port=%d) failed: %s", *port, strerror(errno)); @@ -158,8 +158,8 @@ static bool is_port_available(int *port, bool is_tcp) { } /* Get the bound port number */ - if (getsockname(fd, (struct sockaddr *)addr.addr, - (socklen_t *)&addr.len) < 0) { + if (getsockname(fd, (struct sockaddr *)addr.addr, (socklen_t *)&addr.len) < + 0) { gpr_log(GPR_ERROR, "getsockname() failed: %s", strerror(errno)); close(fd); return false;