Update clang-format to 5.0
diff --git a/src/core/lib/support/alloc.cc b/src/core/lib/support/alloc.cc
index 886d69d..aef4cb8 100644
--- a/src/core/lib/support/alloc.cc
+++ b/src/core/lib/support/alloc.cc
@@ -24,10 +24,10 @@
#include <string.h>
#include "src/core/lib/profiling/timers.h"
-static void *zalloc_with_calloc(size_t sz) { return calloc(sz, 1); }
+static void* zalloc_with_calloc(size_t sz) { return calloc(sz, 1); }
-static void *zalloc_with_gpr_malloc(size_t sz) {
- void *p = gpr_malloc(sz);
+static void* zalloc_with_gpr_malloc(size_t sz) {
+ void* p = gpr_malloc(sz);
memset(p, 0, sz);
return p;
}
@@ -49,8 +49,8 @@
g_alloc_functions = functions;
}
-void *gpr_malloc(size_t size) {
- void *p;
+void* gpr_malloc(size_t size) {
+ void* p;
if (size == 0) return NULL;
GPR_TIMER_BEGIN("gpr_malloc", 0);
p = g_alloc_functions.malloc_fn(size);
@@ -61,8 +61,8 @@
return p;
}
-void *gpr_zalloc(size_t size) {
- void *p;
+void* gpr_zalloc(size_t size) {
+ void* p;
if (size == 0) return NULL;
GPR_TIMER_BEGIN("gpr_zalloc", 0);
p = g_alloc_functions.zalloc_fn(size);
@@ -73,13 +73,13 @@
return p;
}
-void gpr_free(void *p) {
+void gpr_free(void* p) {
GPR_TIMER_BEGIN("gpr_free", 0);
g_alloc_functions.free_fn(p);
GPR_TIMER_END("gpr_free", 0);
}
-void *gpr_realloc(void *p, size_t size) {
+void* gpr_realloc(void* p, size_t size) {
if ((size == 0) && (p == NULL)) return NULL;
GPR_TIMER_BEGIN("gpr_realloc", 0);
p = g_alloc_functions.realloc_fn(p, size);
@@ -90,13 +90,13 @@
return p;
}
-void *gpr_malloc_aligned(size_t size, size_t alignment_log) {
+void* gpr_malloc_aligned(size_t size, size_t alignment_log) {
size_t alignment = ((size_t)1) << alignment_log;
- size_t extra = alignment - 1 + sizeof(void *);
- void *p = gpr_malloc(size + extra);
- void **ret = (void **)(((uintptr_t)p + extra) & ~(alignment - 1));
+ size_t extra = alignment - 1 + sizeof(void*);
+ void* p = gpr_malloc(size + extra);
+ void** ret = (void**)(((uintptr_t)p + extra) & ~(alignment - 1));
ret[-1] = p;
- return (void *)ret;
+ return (void*)ret;
}
-void gpr_free_aligned(void *ptr) { gpr_free(((void **)ptr)[-1]); }
+void gpr_free_aligned(void* ptr) { gpr_free(((void**)ptr)[-1]); }