[lvm-devel] [PATCH 22/30] Fix constness warning

Zdenek Kabelac zkabelac at redhat.com
Mon Oct 25 08:24:29 UTC 2010


Fix usage of const 'data' pointer and also assign void* directly without
uneeded cast for C.

Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
 tools/dmsetup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index a38fc4c..88291f7 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -2399,7 +2399,7 @@ static int _dm_deps_disp(struct dm_report *rh, struct dm_pool *mem,
 			 struct dm_report_field *field, const void *data,
 			 void *private)
 {
-	struct dm_deps *deps = (struct dm_deps *) data;
+	const struct dm_deps *deps = data;
 	int i;
 	char buf[DM_MAX_TYPE_NAME], *repstr;
 
-- 
1.7.3.1




More information about the lvm-devel mailing list