winecfg: Use BOOL type where appropriate

Frédéric Delanoy frederic.delanoy at gmail.com
Wed Oct 16 16:38:33 CDT 2013


---
 programs/winecfg/drivedetect.c | 2 +-
 programs/winecfg/main.c        | 2 +-
 programs/winecfg/theme.c       | 2 +-
 programs/winecfg/winecfg.c     | 6 +++---
 programs/winecfg/winecfg.h     | 4 ++--
 programs/winecfg/x11drvdlg.c   | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/programs/winecfg/drivedetect.c b/programs/winecfg/drivedetect.c
index b0d827d..253c629 100644
--- a/programs/winecfg/drivedetect.c
+++ b/programs/winecfg/drivedetect.c
@@ -302,7 +302,7 @@ static void ensure_drive_c_is_mapped(void)
     HeapFree(GetProcessHeap(), 0, drive_c_dir);
 }
 
-int autodetect_drives(void)
+BOOL autodetect_drives(void)
 {
 #ifdef HAVE_MNTENT_H
     struct mntent *ent;
diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c
index 7376309..6ac5f89 100644
--- a/programs/winecfg/main.c
+++ b/programs/winecfg/main.c
@@ -244,7 +244,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow)
         return 0;
     }
 
-    if (initialize(hInstance) != 0) {
+    if (initialize(hInstance)) {
 	WINE_ERR("initialization failed, aborting\n");
 	ExitProcess(1);
     }
diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c
index be57037..0618974 100644
--- a/programs/winecfg/theme.c
+++ b/programs/winecfg/theme.c
@@ -425,7 +425,7 @@ static void do_apply_theme (int themeIndex, int colorIndex, int sizeIndex)
     }
 }
 
-static int updating_ui;
+static BOOL updating_ui;
 static BOOL theme_dirty;
 
 static void enable_size_and_color_controls (HWND dialog, BOOL enable)
diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c
index 3fbfedf..3ed406b 100644
--- a/programs/winecfg/winecfg.c
+++ b/programs/winecfg/winecfg.c
@@ -749,18 +749,18 @@ void PRINTERROR(void)
         WINE_TRACE("error: '%s'\n", msg);
 }
 
-int initialize(HINSTANCE hInstance)
+BOOL initialize(HINSTANCE hInstance)
 {
     DWORD res = RegCreateKeyA(HKEY_CURRENT_USER, WINE_KEY_ROOT, &config_key);
 
     if (res != ERROR_SUCCESS) {
 	WINE_ERR("RegOpenKey failed on wine config key (%d)\n", res);
-	return 1;
+        return TRUE;
     }
 
     /* we could probably just have the list as static data  */
     settings = HeapAlloc(GetProcessHeap(), 0, sizeof(struct list));
     list_init(settings);
 
-    return 0;
+    return FALSE;
 }
diff --git a/programs/winecfg/winecfg.h b/programs/winecfg/winecfg.h
index b031497..110856a 100644
--- a/programs/winecfg/winecfg.h
+++ b/programs/winecfg/winecfg.h
@@ -73,7 +73,7 @@ WCHAR* load_string (UINT id);
 char *keypath(const char *section);
 WCHAR *keypathW(const WCHAR *section);
 
-int initialize(HINSTANCE hInstance);
+BOOL initialize(HINSTANCE hInstance);
 extern HKEY config_key;
 
 /* hack for the property sheet control  */
@@ -91,7 +91,7 @@ INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
 
 /* Drive management  */
 BOOL load_drives(void);
-int autodetect_drives(void);
+BOOL autodetect_drives(void);
 
 struct drive
 {
diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c
index 2bd4609..8d914ad 100644
--- a/programs/winecfg/x11drvdlg.c
+++ b/programs/winecfg/x11drvdlg.c
@@ -55,7 +55,7 @@ static const WCHAR x11_driverW[] = {'X','1','1',' ','D','r','i','v','e','r',0};
 static const WCHAR default_resW[] = {'8','0','0','x','6','0','0',0};
 
 
-int updating_ui;
+static BOOL updating_ui;
 
 /* convert the x11 desktop key to the new explorer config */
 static void convert_x11_desktop_key(void)
-- 
1.8.4




More information about the wine-patches mailing list