From baa14a975ef92ee6fb301f0e684f56f18f2c55a7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 3 Nov 2017 09:09:36 -0700 Subject: Update clang-format to 5.0 --- test/core/util/memory_counters.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/core/util/memory_counters.c') diff --git a/test/core/util/memory_counters.c b/test/core/util/memory_counters.c index 9fb3ffe095..ff85a63803 100644 --- a/test/core/util/memory_counters.c +++ b/test/core/util/memory_counters.c @@ -27,9 +27,9 @@ static struct grpc_memory_counters g_memory_counters; static gpr_allocation_functions g_old_allocs; -static void *guard_malloc(size_t size); -static void *guard_realloc(void *vptr, size_t size); -static void guard_free(void *vptr); +static void* guard_malloc(size_t size); +static void* guard_realloc(void* vptr, size_t size); +static void guard_free(void* vptr); #ifdef GPR_LOW_LEVEL_COUNTERS /* hide these from the microbenchmark atomic stats */ @@ -41,20 +41,20 @@ static void guard_free(void *vptr); #define NO_BARRIER_LOAD(x) gpr_atm_no_barrier_load(x) #endif -static void *guard_malloc(size_t size) { - size_t *ptr; +static void* guard_malloc(size_t size) { + size_t* ptr; if (!size) return NULL; NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_absolute, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_absolute, (gpr_atm)1); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_relative, (gpr_atm)1); - ptr = (size_t *)g_old_allocs.malloc_fn(size + sizeof(size)); + ptr = (size_t*)g_old_allocs.malloc_fn(size + sizeof(size)); *ptr++ = size; return ptr; } -static void *guard_realloc(void *vptr, size_t size) { - size_t *ptr = (size_t *)vptr; +static void* guard_realloc(void* vptr, size_t size) { + size_t* ptr = (size_t*)vptr; if (vptr == NULL) { return guard_malloc(size); } @@ -67,13 +67,13 @@ static void *guard_realloc(void *vptr, size_t size) { NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, -(gpr_atm)*ptr); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, (gpr_atm)size); NO_BARRIER_FETCH_ADD(&g_memory_counters.total_allocs_absolute, (gpr_atm)1); - ptr = (size_t *)g_old_allocs.realloc_fn(ptr, size + sizeof(size)); + ptr = (size_t*)g_old_allocs.realloc_fn(ptr, size + sizeof(size)); *ptr++ = size; return ptr; } -static void guard_free(void *vptr) { - size_t *ptr = (size_t *)vptr; +static void guard_free(void* vptr) { + size_t* ptr = (size_t*)vptr; if (!vptr) return; --ptr; NO_BARRIER_FETCH_ADD(&g_memory_counters.total_size_relative, -(gpr_atm)*ptr); -- cgit v1.2.3