diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-02-27 18:53:28 +0100 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-02-27 18:53:28 +0100 |
commit | 8d35a660e46b7fb2d05bd1dd1844c882c2aae54c (patch) | |
tree | e9dd31961307b58368141e88b954034cc70b94cf | |
parent | afa811caa8178cf22c0a119a596f9d2f40225dc9 (diff) | |
download | ceph-8d35a660e46b7fb2d05bd1dd1844c882c2aae54c.tar.gz |
crush/builder.c: reduce scope of oldsize in crush_add_rule()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/crush/builder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crush/builder.c b/src/crush/builder.c index 880c8090243..5b5f58a4708 100644 --- a/src/crush/builder.c +++ b/src/crush/builder.c @@ -55,7 +55,6 @@ void crush_finalize(struct crush_map *map) int crush_add_rule(struct crush_map *map, struct crush_rule *rule, int ruleno) { __u32 r; - int oldsize; if (ruleno < 0) { for (r=0; r < map->max_rules; r++) @@ -68,6 +67,7 @@ int crush_add_rule(struct crush_map *map, struct crush_rule *rule, int ruleno) if (r >= map->max_rules) { /* expand array */ + int oldsize; oldsize = map->max_rules; map->max_rules = r+1; map->rules = realloc(map->rules, map->max_rules * sizeof(map->rules[0])); |