]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Compiletest fix alloc.c
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 9 May 2007 09:55:30 +0000 (09:55 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 9 May 2007 09:55:30 +0000 (09:55 +0000)
git-svn-id: file:///svn/unbound/trunk@302 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/alloc.c

index c549f518fec77360bb4118dc0c7b37dfb9b91d7b..bd078e04120a77df061a49ebd5c5b0deea1add61 100644 (file)
@@ -5,6 +5,8 @@
        - tpkg test for retry in TCP mode, against ldns-testns server.
        - daemon checks max number of open files and complains if not enough.
        - test where data expires in the cache.
+       - compiletests: fixed empty body ifstatements in alloc.c, in case
+         locks are disabled.
 
 8 May 2007: Wouter
        - outgoing network keeps list of available tcp buffers for outgoing 
index 5ba9a725c1280d842a48a1b6062c23fdd0face60..3e25fbde8bf5863e652d0a5a5b8adea7834712dd 100644 (file)
@@ -208,8 +208,9 @@ alloc_special_release(struct alloc_cache* alloc, alloc_special_t* mem)
        log_assert(alloc);
        if(!mem)
                return;
-       if(!alloc->super) /* superalloc needs locking */
-               lock_quick_lock(&alloc->lock);
+       if(!alloc->super) { 
+               lock_quick_lock(&alloc->lock); /* superalloc needs locking */
+       }
 
        alloc_special_clean(mem);
        if(alloc->super && alloc->num_quar >= ALLOC_SPECIAL_MAX) {
@@ -221,8 +222,9 @@ alloc_special_release(struct alloc_cache* alloc, alloc_special_t* mem)
        alloc_set_special_next(mem, alloc->quar);
        alloc->quar = mem;
        alloc->num_quar++;
-       if(!alloc->super)
+       if(!alloc->super) {
                lock_quick_unlock(&alloc->lock);
+       }
 }
 
 void