From 76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 27 Feb 2014 20:09:57 -0800 Subject: Massive automated whitespace cleanup I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel --- windows.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'windows.c') diff --git a/windows.c b/windows.c index 042e1c619..7e3c50742 100644 --- a/windows.c +++ b/windows.c @@ -21,7 +21,7 @@ const char *system_default_filename(void) /* I don't think this works on Windows */ user = getenv("USERNAME"); - if (! SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, datapath))) { + if (!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, datapath))) { datapath[0] = '.'; datapath[1] = '\0'; } @@ -31,19 +31,19 @@ const char *system_default_filename(void) return buffer; } -int enumerate_devices (device_callback_t callback, void *userdata) +int enumerate_devices(device_callback_t callback, void *userdata) { // Open the registry key. HKEY hKey; int index = -1; - LONG rc = RegOpenKeyEx (HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_QUERY_VALUE, &hKey); + LONG rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_QUERY_VALUE, &hKey); if (rc != ERROR_SUCCESS) { return -1; } // Get the number of values. DWORD count = 0; - rc = RegQueryInfoKey (hKey, NULL, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL); + rc = RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL); if (rc != ERROR_SUCCESS) { RegCloseKey(hKey); return -1; @@ -52,10 +52,10 @@ int enumerate_devices (device_callback_t callback, void *userdata) for (i = 0; i < count; ++i) { // Get the value name, data and type. char name[512], data[512]; - DWORD name_len = sizeof (name); - DWORD data_len = sizeof (data); + DWORD name_len = sizeof(name); + DWORD data_len = sizeof(data); DWORD type = 0; - rc = RegEnumValue (hKey, i, name, &name_len, NULL, &type, (LPBYTE) data, &data_len); + rc = RegEnumValue(hKey, i, name, &name_len, NULL, &type, (LPBYTE)data, &data_len); if (rc != ERROR_SUCCESS) { RegCloseKey(hKey); return -1; @@ -66,7 +66,7 @@ int enumerate_devices (device_callback_t callback, void *userdata) continue; // Prevent a possible buffer overflow. - if (data_len >= sizeof (data)) { + if (data_len >= sizeof(data)) { RegCloseKey(hKey); return -1; } @@ -74,7 +74,7 @@ int enumerate_devices (device_callback_t callback, void *userdata) // Null terminate the string. data[data_len] = 0; - callback (data, userdata); + callback(data, userdata); index++; if (is_default_dive_computer_device(name)) index = i; -- cgit v1.2.3-70-g09d2