Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: fusl/src/malloc/malloc_usable_size.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/src/malloc/malloc_usable_size.c
diff --git a/fusl/src/malloc/malloc_usable_size.c b/fusl/src/malloc/malloc_usable_size.c
index 6743ea7752a0c44305b009c80ad7b23d153a5ac0..bc5bf21fbf58e2951eb6f0eef6787d797bd1bc05 100644
--- a/fusl/src/malloc/malloc_usable_size.c
+++ b/fusl/src/malloc/malloc_usable_size.c
@@ -1,17 +1,16 @@
#include <malloc.h>
-void *(*const __realloc_dep)(void *, size_t) = realloc;
+void* (*const __realloc_dep)(void*, size_t) = realloc;
struct chunk {
- size_t psize, csize;
- struct chunk *next, *prev;
+ size_t psize, csize;
+ struct chunk *next, *prev;
};
-#define OVERHEAD (2*sizeof(size_t))
+#define OVERHEAD (2 * sizeof(size_t))
#define CHUNK_SIZE(c) ((c)->csize & -2)
-#define MEM_TO_CHUNK(p) (struct chunk *)((char *)(p) - OVERHEAD)
+#define MEM_TO_CHUNK(p) (struct chunk*)((char*)(p)-OVERHEAD)
-size_t malloc_usable_size(void *p)
-{
- return p ? CHUNK_SIZE(MEM_TO_CHUNK(p)) - OVERHEAD : 0;
+size_t malloc_usable_size(void* p) {
+ return p ? CHUNK_SIZE(MEM_TO_CHUNK(p)) - OVERHEAD : 0;
}

Powered by Google App Engine
This is Rietveld 408576698