diff options
author | Evan Huus <eapache@gmail.com> | 2013-07-27 23:01:24 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-07-27 23:01:24 +0000 |
commit | 9b9467cb79209da56835660ec6f57f24d0dd9fec (patch) | |
tree | b5da5c6e14edac08e3c9b8672fc0a555c3f47dbc /epan/wmem/wmem_allocator_block.c | |
parent | 720cce41020260466a59039cc9d9cf8e2d606449 (diff) |
Small optimization: conjoin two mutually exclusive ifs with an else.
svn path=/trunk/; revision=50959
Diffstat (limited to 'epan/wmem/wmem_allocator_block.c')
-rw-r--r-- | epan/wmem/wmem_allocator_block.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/wmem/wmem_allocator_block.c b/epan/wmem/wmem_allocator_block.c index 9b984f43cf..f4830f9176 100644 --- a/epan/wmem/wmem_allocator_block.c +++ b/epan/wmem/wmem_allocator_block.c @@ -596,11 +596,12 @@ wmem_block_split_free_chunk(wmem_block_allocator_t *allocator, if (prev) WMEM_GET_FREE(prev)->next = extra; if (next) WMEM_GET_FREE(next)->prev = extra; - if (allocator->master_head == chunk) + if (allocator->master_head == chunk) { allocator->master_head = extra; - - if (allocator->recycler_head == chunk) + } + else if (allocator->recycler_head == chunk) { allocator->recycler_head = extra; + } } /* Now that we've copied over the free-list stuff (which may have overlapped |