Andrew Talbot : advpack: Constify some variables.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 3 06:48:24 CDT 2007


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

Author: Andrew Talbot <Andrew.Talbot at talbotville.com>
Date:   Mon Apr  2 22:49:59 2007 +0100

advpack: Constify some variables.

---

 dlls/advpack/install.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c
index 3f1b1dd..e2e55ea 100644
--- a/dlls/advpack/install.c
+++ b/dlls/advpack/install.c
@@ -59,7 +59,7 @@ typedef struct _ADVInfo
     BOOL need_reboot;
 } ADVInfo;
 
-typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, void *arg);
+typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, const void *arg);
 
 /* Advanced INF commands */
 static const WCHAR CheckAdminRights[] = {
@@ -76,7 +76,7 @@ static const WCHAR RunPostSetupCommands[] = {
 };
 
 /* Advanced INF callbacks */
-static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, const void *arg)
 {
     INFCONTEXT context;
     HRESULT hr = S_OK;
@@ -99,7 +99,7 @@ static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, void *arg)
     return hr;
 }
 
-static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, const void *arg)
 {
     PERUSERSECTIONW per_user;
     INFCONTEXT context;
@@ -142,7 +142,7 @@ static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, void *arg)
     return SetPerUserSecValuesW(&per_user);
 }
 
-static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, const void *arg)
 {
     HMODULE hm;
     INFCONTEXT context;
@@ -180,9 +180,9 @@ static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg)
     return hr;
 }
 
-static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, void *arg)
+static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, const void *arg)
 {
-    ADVInfo *info = (ADVInfo *)arg;
+    const ADVInfo *info = (const ADVInfo *)arg;
     INFCONTEXT context;
     HRESULT hr = S_OK;
     DWORD size;
@@ -291,7 +291,7 @@ static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key,
     return hr;
 }
 
-static HRESULT check_admin_rights(ADVInfo *info)
+static HRESULT check_admin_rights(const ADVInfo *info)
 {
     INT check;
     INFCONTEXT context;
@@ -311,7 +311,7 @@ static HRESULT check_admin_rights(ADVInfo *info)
 }
 
 /* performs a setupapi-level install of the INF file */
-static HRESULT spapi_install(ADVInfo *info)
+static HRESULT spapi_install(const ADVInfo *info)
 {
     BOOL ret;
     HRESULT res;
@@ -511,7 +511,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec,
 }
 
 /* release the install instance information */
-static void install_release(ADVInfo *info)
+static void install_release(const ADVInfo *info)
 {
     if (info->hinf && info->hinf != INVALID_HANDLE_VALUE)
         SetupCloseInfFile(info->hinf);




More information about the wine-cvs mailing list