From 3eadbbeb12799a176334bc4897efdb2615d1d1ae Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 3 Aug 2010 13:13:01 +0000 Subject: [PATCH] Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes(). --- WHATS_NEW | 3 ++- lib/activate/dev_manager.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 6279f0bbc..c5d55a2b5 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,6 +1,7 @@ Version 2.02.73 - ================================ - Fix constness warning in archive_file structure from archive.c. + Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes(). + Fix const warning in archive_file structure from archive.c. Clean generated files .exported_symbols_generated, example.conf for distclean. Handle failure of all mirrored log devices and all but one mirror leg. Disallow 'mirrored' log type for cluster mirrors. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 7de341e53..9b2761603 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -220,7 +220,7 @@ int dev_manager_info(struct dm_pool *mem, const struct logical_volume *lv, int with_open_count, int with_read_ahead, struct dm_info *info, uint32_t *read_ahead) { - const char *dlid, *name; + char *dlid, *name; int r; if (!(name = build_dm_name(mem, lv->vg->name, lv->name, NULL))) { @@ -236,7 +236,7 @@ int dev_manager_info(struct dm_pool *mem, const struct logical_volume *lv, log_debug("Getting device info for %s [%s]", name, dlid); r = _info(dlid, with_open_count, with_read_ahead, info, read_ahead); - dm_pool_free(mem, (char*)name); + dm_pool_free(mem, name); return r; } @@ -812,7 +812,7 @@ static int _dev_manager_lv_rmnodes(const struct logical_volume *lv) int dev_manager_mknodes(const struct logical_volume *lv) { struct dm_info dminfo; - const char *name; + char *name; int r = 0; if (!(name = build_dm_name(lv->vg->cmd->mem, lv->vg->name, lv->name, NULL))) @@ -826,7 +826,7 @@ int dev_manager_mknodes(const struct logical_volume *lv) r = _dev_manager_lv_rmnodes(lv); } - dm_pool_free(lv->vg->cmd->mem, (char*)name); + dm_pool_free(lv->vg->cmd->mem, name); return r; }