clang-format

pull/525/head
Craig Tiller 10 years ago
parent ae7fe92389
commit d209ed0e55
  1. 3
      src/core/iomgr/resolve_address.c
  2. 2
      src/core/iomgr/tcp_client_posix.c
  3. 3
      src/core/iomgr/tcp_server_posix.c
  4. 6
      test/core/end2end/fixtures/chttp2_fullstack_uds.c

@ -126,7 +126,8 @@ grpc_resolved_addresses *grpc_blocking_resolve_address(
const gpr_timespec start_time = gpr_now();
struct sockaddr_un *un;
if (name[0] == 'u' && name[1] == 'n' && name[2] == 'i' && name[3] == 'x' && name[4] == ':' && name[5] != 0) {
if (name[0] == 'u' && name[1] == 'n' && name[2] == 'i' && name[3] == 'x' &&
name[4] == ':' && name[5] != 0) {
addrs = gpr_malloc(sizeof(grpc_resolved_addresses));
addrs->naddrs = 1;
addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address));

@ -62,7 +62,7 @@ typedef struct {
int refs;
} async_connect;
static int prepare_socket(const struct sockaddr* addr, int fd) {
static int prepare_socket(const struct sockaddr *addr, int fd) {
if (fd < 0) {
goto error;
}

@ -178,7 +178,8 @@ static int prepare_socket(int fd, const struct sockaddr *addr, int addr_len) {
}
if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) ||
(addr->sa_family != AF_UNIX && (!grpc_set_socket_low_latency(fd, 1) || !grpc_set_socket_reuse_addr(fd, 1)))) {
(addr->sa_family != AF_UNIX && (!grpc_set_socket_low_latency(fd, 1) ||
!grpc_set_socket_reuse_addr(fd, 1)))) {
gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd,
strerror(errno));
goto error;

@ -67,7 +67,8 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data));
memset(&f, 0, sizeof(f));
gpr_asprintf(&ffd->localaddr, "unix:/tmp/grpc_fullstack_test.%d.%d", getpid(), unique++);
gpr_asprintf(&ffd->localaddr, "unix:/tmp/grpc_fullstack_test.%d.%d", getpid(),
unique++);
f.fixture_data = ffd;
f.client_cq = grpc_completion_queue_create();
@ -103,7 +104,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
static grpc_end2end_test_config configs[] = {
{"chttp2/fullstack_uds", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, };
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
int main(int argc, char **argv) {
size_t i;

Loading…
Cancel
Save