diff options
author | Simon Rozman <simon@rozman.si> | 2020-10-16 15:51:50 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-30 16:51:01 +0100 |
commit | 4ac9a6dcc6093b8cbc33f7b84df55b5ae4c3a605 (patch) | |
tree | 7588a953c54dba34c044379519333893fd994314 /api/adapter.c | |
parent | api: fix dead code warning for arm platform (diff) | |
download | wintun-4ac9a6dcc6093b8cbc33f7b84df55b5ae4c3a605.tar.xz wintun-4ac9a6dcc6093b8cbc33f7b84df55b5ae4c3a605.zip |
api: fix grammar
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/adapter.c')
-rw-r--r-- | api/adapter.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/api/adapter.c b/api/adapter.c index 6613d9f..b4e3d23 100644 --- a/api/adapter.c +++ b/api/adapter.c @@ -127,13 +127,13 @@ GetDeviceRegistryMultiString( } static WINTUN_STATUS -IsOurAdapter(_In_ HDEVINFO DevInfo, _In_ SP_DEVINFO_DATA *DevInfoData, _Out_ BOOL *IsOur) +IsOurAdapter(_In_ HDEVINFO DevInfo, _In_ SP_DEVINFO_DATA *DevInfoData, _Out_ BOOL *IsOurs) { WCHAR *Hwids; DWORD Result = GetDeviceRegistryMultiString(DevInfo, DevInfoData, SPDRP_HARDWAREID, &Hwids); if (Result != ERROR_SUCCESS) return LOG(WINTUN_LOG_ERR, L"Failed to query hardware ID"), Result; - *IsOur = DriverIsOurHardwareID(Hwids); + *IsOurs = DriverIsOurHardwareID(Hwids); return ERROR_SUCCESS; } @@ -237,8 +237,8 @@ AdapterDisableAllOurs(_In_ HDEVINFO DevInfo, _Inout_ SP_DEVINFO_DATA_LIST **Disa } goto cleanupDeviceInfoData; } - BOOL IsOur; - if (IsOurAdapter(DevInfo, &DeviceNode->Data, &IsOur) != ERROR_SUCCESS || !IsOur) + BOOL IsOurs; + if (IsOurAdapter(DevInfo, &DeviceNode->Data, &IsOurs) != ERROR_SUCCESS || !IsOurs) goto cleanupDeviceInfoData; ULONG Status, ProblemCode; @@ -311,8 +311,8 @@ AdapterDeleteAllOurs() continue; } - BOOL IsOur; - if (IsOurAdapter(DevInfo, &DevInfoData, &IsOur) != ERROR_SUCCESS || !IsOur) + BOOL IsOurs; + if (IsOurAdapter(DevInfo, &DevInfoData, &IsOurs) != ERROR_SUCCESS || !IsOurs) continue; LOG(WINTUN_LOG_INFO, L"Force closing all open handles for existing adapter"); @@ -645,14 +645,14 @@ WintunGetAdapter( } /* Check the Hardware ID to make sure it's a real Wintun device. */ - BOOL IsOur; - Result = IsOurAdapter(DevInfo, &DevInfoData, &IsOur); + BOOL IsOurs; + Result = IsOurAdapter(DevInfo, &DevInfoData, &IsOurs); if (Result != ERROR_SUCCESS) { LOG(WINTUN_LOG_ERR, L"Failed to determine hardware ID"); goto cleanupDevInfo; } - if (!IsOur) + if (!IsOurs) { LOG(WINTUN_LOG_ERR, L"Foreign adapter with the same name exists"); Result = ERROR_ALREADY_EXISTS; @@ -1478,8 +1478,8 @@ WintunEnumAdapters(_In_z_count_c_(MAX_POOL) const WCHAR *Pool, _In_ WINTUN_ENUM_ continue; } - BOOL IsOur; - if (IsOurAdapter(DevInfo, &DevInfoData, &IsOur) != ERROR_SUCCESS || !IsOur) + BOOL IsOurs; + if (IsOurAdapter(DevInfo, &DevInfoData, &IsOurs) != ERROR_SUCCESS || !IsOurs) continue; BOOL IsMember; |