aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/surface')
-rw-r--r--src/core/surface/call.c4
-rw-r--r--src/core/surface/channel.c2
-rw-r--r--src/core/surface/client.c19
-rw-r--r--src/core/surface/lame_client.c19
-rw-r--r--src/core/surface/server.c11
5 files changed, 24 insertions, 31 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c
index 14d990df6a..52a4270faf 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -203,7 +203,7 @@ struct grpc_call {
gpr_refcount internal_refcount;
};
-#define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call)+1))
+#define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call) + 1))
#define CALL_FROM_CALL_STACK(call_stack) (((grpc_call *)(call_stack)) - 1)
#define CALL_ELEM_FROM_CALL(call, idx) \
grpc_call_stack_element(CALL_STACK_FROM_CALL(call), idx)
@@ -863,7 +863,7 @@ static gpr_uint32 decode_status(grpc_mdelem *md) {
gpr_uint32 status;
void *user_data = grpc_mdelem_get_user_data(md, destroy_status);
if (user_data) {
- status = ((gpr_uint32)(gpr_intptr) user_data) - STATUS_OFFSET;
+ status = ((gpr_uint32)(gpr_intptr)user_data) - STATUS_OFFSET;
} else {
if (!gpr_parse_bytes_to_uint32(grpc_mdstr_as_c_string(md->value),
GPR_SLICE_LENGTH(md->value->slice),
diff --git a/src/core/surface/channel.c b/src/core/surface/channel.c
index 8ef13675fe..a1bcea58dd 100644
--- a/src/core/surface/channel.c
+++ b/src/core/surface/channel.c
@@ -51,7 +51,7 @@ struct grpc_channel {
grpc_mdstr *authority_string;
};
-#define CHANNEL_STACK_FROM_CHANNEL(c) ((grpc_channel_stack *)((c)+1))
+#define CHANNEL_STACK_FROM_CHANNEL(c) ((grpc_channel_stack *)((c) + 1))
grpc_channel *grpc_channel_create_from_filters(
const grpc_channel_filter **filters, size_t num_filters,
diff --git a/src/core/surface/client.c b/src/core/surface/client.c
index fe3a81f1b9..a7c9b902ed 100644
--- a/src/core/surface/client.c
+++ b/src/core/surface/client.c
@@ -38,9 +38,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-typedef struct { void *unused; } call_data;
+typedef struct {
+ void *unused;
+} call_data;
-typedef struct { void *unused; } channel_data;
+typedef struct {
+ void *unused;
+} channel_data;
static void call_op(grpc_call_element *elem, grpc_call_element *from_elem,
grpc_call_op *op) {
@@ -109,11 +113,6 @@ static void init_channel_elem(grpc_channel_element *elem,
static void destroy_channel_elem(grpc_channel_element *elem) {}
const grpc_channel_filter grpc_client_surface_filter = {
- call_op, channel_op,
-
- sizeof(call_data), init_call_elem, destroy_call_elem,
-
- sizeof(channel_data), init_channel_elem, destroy_channel_elem,
-
- "client",
-};
+ call_op, channel_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem, "client", };
diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c
index 056c98646b..6098ac78de 100644
--- a/src/core/surface/lame_client.c
+++ b/src/core/surface/lame_client.c
@@ -42,9 +42,13 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-typedef struct { void *unused; } call_data;
+typedef struct {
+ void *unused;
+} call_data;
-typedef struct { grpc_mdelem *message; } channel_data;
+typedef struct {
+ grpc_mdelem *message;
+} channel_data;
static void do_nothing(void *data, grpc_op_error error) {}
@@ -111,14 +115,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) {
}
static const grpc_channel_filter lame_filter = {
- call_op, channel_op,
-
- sizeof(call_data), init_call_elem, destroy_call_elem,
-
- sizeof(channel_data), init_channel_elem, destroy_channel_elem,
-
- "lame-client",
-};
+ call_op, channel_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem, "lame-client", };
grpc_channel *grpc_lame_client_channel_create(void) {
static const grpc_channel_filter *filters[] = {&lame_filter};
diff --git a/src/core/surface/server.c b/src/core/surface/server.c
index 9585e4e8ea..9a001f4c33 100644
--- a/src/core/surface/server.c
+++ b/src/core/surface/server.c
@@ -411,14 +411,9 @@ static void destroy_channel_elem(grpc_channel_element *elem) {
}
static const grpc_channel_filter server_surface_filter = {
- call_op, channel_op,
-
- sizeof(call_data), init_call_elem, destroy_call_elem,
-
- sizeof(channel_data), init_channel_elem, destroy_channel_elem,
-
- "server",
-};
+ call_op, channel_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem, "server", };
static void early_terminate_requested_calls(grpc_completion_queue *cq,
void **tags, size_t ntags) {