From 007aa328fcf973b47fcfd8225ab9077cb3c45145 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Mon, 23 Jan 2023 16:54:36 -0800 Subject: Format. --- listpool/src/listpool.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'listpool/src/listpool.c') diff --git a/listpool/src/listpool.c b/listpool/src/listpool.c index 9c86a3b..8e49f32 100644 --- a/listpool/src/listpool.c +++ b/listpool/src/listpool.c @@ -2,15 +2,16 @@ #include -void listpool_make_(listpool* pool, list* nodes, void* blocks, - size_t num_blocks, size_t block_size_bytes) { +void listpool_make_( + listpool* pool, list* nodes, void* blocks, size_t num_blocks, + size_t block_size_bytes) { assert(pool); pool->block_size_bytes = block_size_bytes; - pool->num_blocks = num_blocks; - pool->free = &nodes[0]; - pool->used = 0; - pool->nodes = nodes; - pool->blocks = blocks; + pool->num_blocks = num_blocks; + pool->free = &nodes[0]; + pool->used = 0; + pool->nodes = nodes; + pool->blocks = blocks; list_make(nodes, num_blocks); memset(blocks, 0, num_blocks * block_size_bytes); } @@ -69,9 +70,9 @@ void listpool_free_(listpool* pool, void** block_ptr) { if (!pool->free) { pool->free = item; } else { - item->next = pool->free; + item->next = pool->free; pool->free->prev = item; - pool->free = item; + pool->free = item; } *block_ptr = 0; -- cgit v1.2.3