diff options
author | Timothy Arceri <timothy.arceri@collabora.com> | 2016-10-07 21:10:37 +1100 |
---|---|---|
committer | Timothy Arceri <timothy.arceri@collabora.com> | 2016-10-07 21:24:50 +1100 |
commit | 965ebc8b286afee827b820479cc1714a2aeb46cc (patch) | |
tree | f0f658ac66954804f6a71fd636e5bad52fd8aec9 | |
parent | a599b1c2037ac8aca6c92350c8a7b3e42c81deaa (diff) | |
download | external_mesa3d-965ebc8b286afee827b820479cc1714a2aeb46cc.zip external_mesa3d-965ebc8b286afee827b820479cc1714a2aeb46cc.tar.gz external_mesa3d-965ebc8b286afee827b820479cc1714a2aeb46cc.tar.bz2 |
util: remove unused variable
Also initialise page at declaration.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
-rw-r--r-- | src/util/slab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/util/slab.c b/src/util/slab.c index cbe4c88..4264814 100644 --- a/src/util/slab.c +++ b/src/util/slab.c @@ -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; |