1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00

We can re-use the already existing EG(windows_version_info) here and save a little bit of memory too!

This commit is contained in:
Kalle Sommer Nielsen
2015-03-29 09:47:14 +02:00
parent c48611772d
commit de2d244f8e
+1 -8
View File
@@ -291,21 +291,14 @@ PHPAPI zend_string *php_info_html_esc(char *string)
char* php_get_windows_name()
{
OSVERSIONINFOEX osvi;
OSVERSIONINFOEX osvi = EG(windows_version_info);
SYSTEM_INFO si;
PGNSI pGNSI;
PGPI pGPI;
BOOL bOsVersionInfoEx;
DWORD dwType;
char *major = NULL, *sub = NULL, *retval;
ZeroMemory(&si, sizeof(SYSTEM_INFO));
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if (!(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi))) {
return NULL;
}
pGNSI = (PGNSI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetNativeSystemInfo");
if(NULL != pGNSI) {