Alexandre Julliard : msi: Avoid casting const pointers to non-const.

Alexandre Julliard julliard at winehq.org
Wed Oct 17 09:05:27 CDT 2007


Module: wine
Branch: master
Commit: 6adf058089544e39ba10160ca1c80aeb1ae0a864
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6adf058089544e39ba10160ca1c80aeb1ae0a864

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Oct 17 14:14:21 2007 +0200

msi: Avoid casting const pointers to non-const.

---

 dlls/msi/table.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 0193649..c5850e3 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -53,9 +53,9 @@ typedef struct tagMSICOLUMNHASHENTRY
 
 typedef struct tagMSICOLUMNINFO
 {
-    LPCWSTR tablename;
+    LPWSTR tablename;
     UINT   number;
-    LPCWSTR colname;
+    LPWSTR colname;
     UINT   type;
     UINT   offset;
     INT    ref_count;
@@ -87,12 +87,12 @@ static const WCHAR szStringPool[] = {
     '_','S','t','r','i','n','g','P','o','o','l',0 };
 
 /* information for default tables */
-static const WCHAR szTables[]  = { '_','T','a','b','l','e','s',0 };
-static const WCHAR szTable[]  = { 'T','a','b','l','e',0 };
-static const WCHAR szName[]    = { 'N','a','m','e',0 };
-static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
-static const WCHAR szNumber[]  = { 'N','u','m','b','e','r',0 };
-static const WCHAR szType[]    = { 'T','y','p','e',0 };
+static WCHAR szTables[]  = { '_','T','a','b','l','e','s',0 };
+static WCHAR szTable[]  = { 'T','a','b','l','e',0 };
+static WCHAR szName[]    = { 'N','a','m','e',0 };
+static WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
+static WCHAR szNumber[]  = { 'N','u','m','b','e','r',0 };
+static WCHAR szType[]    = { 'T','y','p','e',0 };
 
 /* These tables are written into (the .hash_table part).
  * Do not mark them const.
@@ -933,8 +933,8 @@ static void msi_free_colinfo( MSICOLUMNINFO *colinfo, UINT count )
 
     for( i=0; i<count; i++ )
     {
-        msi_free( (LPWSTR) colinfo[i].tablename );
-        msi_free( (LPWSTR) colinfo[i].colname );
+        msi_free( colinfo[i].tablename );
+        msi_free( colinfo[i].colname );
         msi_free( colinfo[i].hash_table );
     }
 }




More information about the wine-cvs mailing list