From 73a10ac9cc0b5c642b5b74e1943c2334489faa63 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 7 May 2013 17:26:33 +0200 Subject: [PATCH] crush/builder.c: reduce scope of oldsize in crush_add_bucket() Signed-off-by: Danny Al-Gaaf --- src/crush/builder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/crush/builder.c b/src/crush/builder.c index 3473704503d03..2eb6ff5fc1e55 100644 --- a/src/crush/builder.c +++ b/src/crush/builder.c @@ -125,7 +125,6 @@ int crush_add_bucket(struct crush_map *map, int id, struct crush_bucket *bucket) { - int oldsize; int pos; /* find a bucket id */ @@ -135,7 +134,7 @@ int crush_add_bucket(struct crush_map *map, while (pos >= map->max_buckets) { /* expand array */ - oldsize = map->max_buckets; + int oldsize = map->max_buckets; if (map->max_buckets) map->max_buckets *= 2; else -- 2.39.5