api: fix grammar

Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2020-10-16 15:51:50 +02:00 committed by Jason A. Donenfeld
parent ef66541200
commit 4ac9a6dcc6

View File

@ -127,13 +127,13 @@ GetDeviceRegistryMultiString(
} }
static WINTUN_STATUS 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; WCHAR *Hwids;
DWORD Result = GetDeviceRegistryMultiString(DevInfo, DevInfoData, SPDRP_HARDWAREID, &Hwids); DWORD Result = GetDeviceRegistryMultiString(DevInfo, DevInfoData, SPDRP_HARDWAREID, &Hwids);
if (Result != ERROR_SUCCESS) if (Result != ERROR_SUCCESS)
return LOG(WINTUN_LOG_ERR, L"Failed to query hardware ID"), Result; return LOG(WINTUN_LOG_ERR, L"Failed to query hardware ID"), Result;
*IsOur = DriverIsOurHardwareID(Hwids); *IsOurs = DriverIsOurHardwareID(Hwids);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -237,8 +237,8 @@ AdapterDisableAllOurs(_In_ HDEVINFO DevInfo, _Inout_ SP_DEVINFO_DATA_LIST **Disa
} }
goto cleanupDeviceInfoData; goto cleanupDeviceInfoData;
} }
BOOL IsOur; BOOL IsOurs;
if (IsOurAdapter(DevInfo, &DeviceNode->Data, &IsOur) != ERROR_SUCCESS || !IsOur) if (IsOurAdapter(DevInfo, &DeviceNode->Data, &IsOurs) != ERROR_SUCCESS || !IsOurs)
goto cleanupDeviceInfoData; goto cleanupDeviceInfoData;
ULONG Status, ProblemCode; ULONG Status, ProblemCode;
@ -311,8 +311,8 @@ AdapterDeleteAllOurs()
continue; continue;
} }
BOOL IsOur; BOOL IsOurs;
if (IsOurAdapter(DevInfo, &DevInfoData, &IsOur) != ERROR_SUCCESS || !IsOur) if (IsOurAdapter(DevInfo, &DevInfoData, &IsOurs) != ERROR_SUCCESS || !IsOurs)
continue; continue;
LOG(WINTUN_LOG_INFO, L"Force closing all open handles for existing adapter"); 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. */ /* Check the Hardware ID to make sure it's a real Wintun device. */
BOOL IsOur; BOOL IsOurs;
Result = IsOurAdapter(DevInfo, &DevInfoData, &IsOur); Result = IsOurAdapter(DevInfo, &DevInfoData, &IsOurs);
if (Result != ERROR_SUCCESS) if (Result != ERROR_SUCCESS)
{ {
LOG(WINTUN_LOG_ERR, L"Failed to determine hardware ID"); LOG(WINTUN_LOG_ERR, L"Failed to determine hardware ID");
goto cleanupDevInfo; goto cleanupDevInfo;
} }
if (!IsOur) if (!IsOurs)
{ {
LOG(WINTUN_LOG_ERR, L"Foreign adapter with the same name exists"); LOG(WINTUN_LOG_ERR, L"Foreign adapter with the same name exists");
Result = ERROR_ALREADY_EXISTS; Result = ERROR_ALREADY_EXISTS;
@ -1478,8 +1478,8 @@ WintunEnumAdapters(_In_z_count_c_(MAX_POOL) const WCHAR *Pool, _In_ WINTUN_ENUM_
continue; continue;
} }
BOOL IsOur; BOOL IsOurs;
if (IsOurAdapter(DevInfo, &DevInfoData, &IsOur) != ERROR_SUCCESS || !IsOur) if (IsOurAdapter(DevInfo, &DevInfoData, &IsOurs) != ERROR_SUCCESS || !IsOurs)
continue; continue;
BOOL IsMember; BOOL IsMember;