Fully initialize OSVERSIONINFOEX struct

Use wxZeroMemory() instead of explicitly initializing struct fields with
zeroes, this is simpler and less error-prone.
This commit is contained in:
Maarten Bent
2015-10-16 17:12:17 +02:00
committed by Vadim Zeitlin
parent 3c57698140
commit 2ec9b3390d

View File

@@ -1265,7 +1265,10 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
bool wxCheckOsVersion(int majorVsn, int minorVsn)
{
OSVERSIONINFOEX osvi = { sizeof(osvi), 0, 0, 0, 0, { 0 }, 0, 0 };
OSVERSIONINFOEX osvi;
wxZeroMemory(osvi);
osvi.dwOSVersionInfoSize = sizeof(osvi);
DWORDLONG const dwlConditionMask =
::VerSetConditionMask(
::VerSetConditionMask(