mmdevapi: Use BOOL type where appropriate.

This commit is contained in:
Frédéric Delanoy 2013-11-12 01:16:37 +01:00 committed by Alexandre Julliard
parent 1d65efe50b
commit e50dfb69ee
1 changed files with 9 additions and 9 deletions

View File

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