diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 09:16:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 09:17:13 +0300 |
commit | 108045faa01849115c54190ebed788faf36dcb56 (patch) | |
tree | 64d024b47b0dcb6850108377c55e96917645efe5 /intern/guardedalloc | |
parent | 3076d95ba441cd32706a27d18922a30f8fd28b8a (diff) |
ClangFormat: format '#if 0' code in intern/
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r-- | intern/guardedalloc/MEM_guardedalloc.h | 4 | ||||
-rw-r--r-- | intern/guardedalloc/intern/mallocn_guarded_impl.c | 18 |
2 files changed, 14 insertions, 8 deletions
diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index 4cefc27bc54..b5ac3288a61 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -70,10 +70,10 @@ extern size_t (*MEM_allocN_len)(const void *vmemh) ATTR_WARN_UNUSED_RESULT; extern void (*MEM_freeN)(void *vmemh); #if 0 /* UNUSED */ - /** +/** * Return zero if memory is not in allocated list */ - extern short (*MEM_testN)(void *vmemh); +extern short (*MEM_testN)(void *vmemh); #endif /** diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index b24e1c8c984..384cba113ff 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -907,7 +907,8 @@ short MEM_guarded_testN(void *vmemh) mem_lock_thread(); membl = membase->first; - if (membl) membl = MEMNEXT(membl); + if (membl) + membl = MEMNEXT(membl); while (membl) { if (vmemh == membl + 1) { @@ -917,7 +918,8 @@ short MEM_guarded_testN(void *vmemh) if (membl->next) membl = MEMNEXT(membl->next); - else break; + else + break; } mem_unlock_thread(); @@ -1013,8 +1015,10 @@ static void addtail(volatile localListBase *listbase, void *vlink) /* for a generic API error checks here is fine but * the limited use here they will never be NULL */ #if 0 - if (link == NULL) return; - if (listbase == NULL) return; + if (link == NULL) + return; + if (listbase == NULL) + return; #endif link->next = NULL; @@ -1034,8 +1038,10 @@ static void remlink(volatile localListBase *listbase, void *vlink) /* for a generic API error checks here is fine but * the limited use here they will never be NULL */ #if 0 - if (link == NULL) return; - if (listbase == NULL) return; + if (link == NULL) + return; + if (listbase == NULL) + return; #endif if (link->next) |