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:
parent
3c57698140
commit
2ec9b3390d
1 changed files with 4 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue