aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface/channel_init.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/surface/channel_init.cc')
-rw-r--r--src/core/lib/surface/channel_init.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/lib/surface/channel_init.cc b/src/core/lib/surface/channel_init.cc
index 33f444b89e..17d8caf56f 100644
--- a/src/core/lib/surface/channel_init.cc
+++ b/src/core/lib/surface/channel_init.cc
@@ -23,13 +23,13 @@
typedef struct stage_slot {
grpc_channel_init_stage fn;
- void *arg;
+ void* arg;
int priority;
size_t insertion_order;
} stage_slot;
typedef struct stage_slots {
- stage_slot *slots;
+ stage_slot* slots;
size_t num_slots;
size_t cap_slots;
} stage_slots;
@@ -49,24 +49,24 @@ void grpc_channel_init_init(void) {
void grpc_channel_init_register_stage(grpc_channel_stack_type type,
int priority,
grpc_channel_init_stage stage,
- void *stage_arg) {
+ void* stage_arg) {
GPR_ASSERT(!g_finalized);
if (g_slots[type].cap_slots == g_slots[type].num_slots) {
g_slots[type].cap_slots = GPR_MAX(8, 3 * g_slots[type].cap_slots / 2);
- g_slots[type].slots = (stage_slot *)gpr_realloc(
+ g_slots[type].slots = (stage_slot*)gpr_realloc(
g_slots[type].slots,
g_slots[type].cap_slots * sizeof(*g_slots[type].slots));
}
- stage_slot *s = &g_slots[type].slots[g_slots[type].num_slots++];
+ stage_slot* s = &g_slots[type].slots[g_slots[type].num_slots++];
s->insertion_order = g_slots[type].num_slots;
s->priority = priority;
s->fn = stage;
s->arg = stage_arg;
}
-static int compare_slots(const void *a, const void *b) {
- const stage_slot *sa = (const stage_slot *)a;
- const stage_slot *sb = (const stage_slot *)b;
+static int compare_slots(const void* a, const void* b) {
+ const stage_slot* sa = (const stage_slot*)a;
+ const stage_slot* sb = (const stage_slot*)b;
int c = GPR_ICMP(sa->priority, sb->priority);
if (c != 0) return c;
@@ -85,12 +85,12 @@ void grpc_channel_init_finalize(void) {
void grpc_channel_init_shutdown(void) {
for (int i = 0; i < GRPC_NUM_CHANNEL_STACK_TYPES; i++) {
gpr_free(g_slots[i].slots);
- g_slots[i].slots = (stage_slot *)(void *)(uintptr_t)0xdeadbeef;
+ g_slots[i].slots = (stage_slot*)(void*)(uintptr_t)0xdeadbeef;
}
}
-bool grpc_channel_init_create_stack(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder,
+bool grpc_channel_init_create_stack(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder,
grpc_channel_stack_type type) {
GPR_ASSERT(g_finalized);
@@ -98,7 +98,7 @@ bool grpc_channel_init_create_stack(grpc_exec_ctx *exec_ctx,
grpc_channel_stack_type_string(type));
for (size_t i = 0; i < g_slots[type].num_slots; i++) {
- const stage_slot *slot = &g_slots[type].slots[i];
+ const stage_slot* slot = &g_slots[type].slots[i];
if (!slot->fn(exec_ctx, builder, slot->arg)) {
return false;
}