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:
committed by
Vadim Zeitlin
parent
3c57698140
commit
2ec9b3390d
@@ -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(
|
||||
|
Reference in New Issue
Block a user