[AUDIOSVC] Fix the coding style. No code changes!

This commit is contained in:
Eric Kohl 2019-07-27 16:54:15 +02:00
parent 6ee7cba77b
commit 353e05a4f3
5 changed files with 31 additions and 51 deletions

View file

@ -14,7 +14,7 @@ SERVICE_STATUS service_status;
/* This is for testing only! */
VOID
InitializeFakeDevice()
InitializeFakeDevice(VOID)
{
PnP_AudioDevice* list_node;
@ -132,7 +132,6 @@ ServiceMain(DWORD argc, LPWSTR argv)
/* start system audio services */
StartSystemAudioServices();
InitializeFakeDevice();
logmsg("Processing existing devices\n");
@ -156,7 +155,7 @@ ServiceMain(DWORD argc, LPWSTR argv)
SetServiceStatus(service_status_handle, &service_status);
}
int wmain()
int wmain(VOID)
{
SERVICE_TABLE_ENTRYW service_table[] =
{

View file

@ -23,7 +23,7 @@ static HDEVNOTIFY device_notification_handle = NULL;
*/
BOOL
ProcessExistingDevices()
ProcessExistingDevices(VOID)
{
SP_DEVICE_INTERFACE_DATA interface_data;
SP_DEVINFO_DATA device_data;
@ -124,7 +124,7 @@ ProcessDeviceArrival(DEV_BROADCAST_DEVICEINTERFACE* device)
*/
BOOL
RegisterForDeviceNotifications()
RegisterForDeviceNotifications(VOID)
{
DEV_BROADCAST_DEVICEINTERFACE notification_filter;
@ -141,7 +141,6 @@ RegisterForDeviceNotifications()
DEVICE_NOTIFY_SERVICE_HANDLE
/* |
DEVICE_NOTIFY_ALL_INTERFACE_CLASSES*/);
if (!device_notification_handle)
{
logmsg("RegisterDeviceNotification() failed with error %d\n", GetLastError());
@ -156,7 +155,8 @@ RegisterForDeviceNotifications()
called.
*/
VOID UnregisterDeviceNotifications()
VOID
UnregisterDeviceNotifications(VOID)
{
/* TODO -- NOT IMPLEMENTED! */

View file

@ -13,7 +13,7 @@
static HANDLE audio_device_list_lock = NULL;
BOOL
InitializeAudioDeviceListLock()
InitializeAudioDeviceListLock(VOID)
{
/* The security stuff is to make sure the mutex can be grabbed by
other processes - is this the best idea though ??? */
@ -36,23 +36,22 @@ InitializeAudioDeviceListLock()
}
VOID
KillAudioDeviceListLock()
KillAudioDeviceListLock(VOID)
{
CloseHandle(audio_device_list_lock);
audio_device_list_lock = NULL;
}
VOID
LockAudioDeviceList()
LockAudioDeviceList(VOID)
{
assert(audio_device_list_lock != NULL);
WaitForSingleObject(audio_device_list_lock, INFINITE);
}
VOID
UnlockAudioDeviceList()
UnlockAudioDeviceList(VOID)
{
assert(audio_device_list_lock != NULL);
ReleaseMutex(audio_device_list_lock);
}

View file

@ -23,7 +23,6 @@ CreateDeviceDescriptor(WCHAR* path, BOOL is_enabled)
/* printf("path_length %d, total %d\n", path_length, size);*/
device = malloc(size);
if (! device)
{
logmsg("Failed to create a device descriptor (malloc fail)\n");
@ -120,7 +119,6 @@ CreateAudioDeviceList(DWORD max_size)
0,
max_size,
AUDIO_LIST_NAME);
if (!device_list_file)
{
logmsg("Creation of audio device list failed (err %d)\n", GetLastError());
@ -138,7 +136,6 @@ CreateAudioDeviceList(DWORD max_size)
0,
0,
max_size);
if (!audio_device_list)
{
logmsg("MapViewOfFile FAILED (err %d)\n", GetLastError());
@ -168,7 +165,7 @@ CreateAudioDeviceList(DWORD max_size)
}
VOID
DestroyAudioDeviceList()
DestroyAudioDeviceList(VOID)
{
logmsg("Destroying device list\n");

View file

@ -47,7 +47,6 @@ StartAudioService(
BOOL ret;
hService = OpenService(hSCManager, ServiceName, SERVICE_ALL_ACCESS);
if (!hService)
{
logmsg("Failed to open service %S %x\n", ServiceName, GetLastError());
@ -67,11 +66,8 @@ StartAudioService(
return ret;
}
BOOL
StartSystemAudioServices()
StartSystemAudioServices(VOID)
{
SC_HANDLE hSCManager;
@ -92,14 +88,3 @@ StartSystemAudioServices()
CloseServiceHandle(hSCManager);
return TRUE;
}