util: remove unused variable

Also initialise page at declaration.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Timothy Arceri
2016-10-07 21:10:37 +11:00
parent a599b1c203
commit 965ebc8b28
+2 -4
View File
@@ -174,11 +174,9 @@ void slab_destroy_child(struct slab_child_pool *pool)
static bool
slab_add_new_page(struct slab_child_pool *pool)
{
struct slab_page_header *page;
unsigned i;
struct slab_page_header *page = malloc(sizeof(struct slab_page_header) +
pool->parent->num_elements * pool->parent->element_size);
page = malloc(sizeof(struct slab_page_header) +
pool->parent->num_elements * pool->parent->element_size);
if (!page)
return false;