=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: mmdevapi: Use BOOL type where appropriate.

Alexandre Julliard julliard at winehq.org
Tue Nov 12 14:26:35 CST 2013


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Nov 12 01:16:37 2013 +0100

mmdevapi: Use BOOL type where appropriate.

---

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

diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c
index 6bb0d3f..e2a7cc5 100644
--- a/dlls/mmdevapi/devenum.c
+++ b/dlls/mmdevapi/devenum.c
@@ -1066,8 +1066,8 @@ static void notify_clients(EDataFlow flow, ERole role, const WCHAR *id)
         notify_clients(flow, eMultimedia, id);
 }
 
-static int notify_if_changed(EDataFlow flow, ERole role, HKEY key,
-        const WCHAR *val_name, WCHAR *old_val, IMMDevice *def_dev)
+static BOOL notify_if_changed(EDataFlow flow, ERole role, HKEY key,
+                              const WCHAR *val_name, WCHAR *old_val, IMMDevice *def_dev)
 {
     WCHAR new_val[64], *id;
     DWORD size;
@@ -1082,7 +1082,7 @@ static int notify_if_changed(EDataFlow flow, ERole role, HKEY key,
                 hr = IMMDevice_GetId(def_dev, &id);
                 if(FAILED(hr)){
                     ERR("GetId failed: %08x\n", hr);
-                    return 0;
+                    return FALSE;
                 }
             }else
                 id = NULL;
@@ -1091,23 +1091,23 @@ static int notify_if_changed(EDataFlow flow, ERole role, HKEY key,
             old_val[0] = 0;
             CoTaskMemFree(id);
 
-            return 1;
+            return TRUE;
         }
 
         /* system default -> system default, noop */
-        return 0;
+        return FALSE;
     }
 
     if(!lstrcmpW(old_val, new_val)){
         /* set by user -> same value */
-        return 0;
+        return FALSE;
     }
 
     if(new_val[0] != 0){
         /* set by user -> different value */
         notify_clients(flow, role, new_val);
         memcpy(old_val, new_val, sizeof(new_val));
-        return 1;
+        return TRUE;
     }
 
     /* set by user -> system default */
@@ -1115,7 +1115,7 @@ static int notify_if_changed(EDataFlow flow, ERole role, HKEY key,
         hr = IMMDevice_GetId(def_dev, &id);
         if(FAILED(hr)){
             ERR("GetId failed: %08x\n", hr);
-            return 0;
+            return FALSE;
         }
     }else
         id = NULL;
@@ -1124,7 +1124,7 @@ static int notify_if_changed(EDataFlow flow, ERole role, HKEY key,
     old_val[0] = 0;
     CoTaskMemFree(id);
 
-    return 1;
+    return TRUE;
 }
 
 static DWORD WINAPI notif_thread_proc(void *user)




More information about the wine-cvs mailing list