--------------------- PatchSet 8737 Date: 2006/10/29 08:12:20 Author: serassio Branch: nt Tag: (none) Log: Ran indent Members: src/win32.c:1.7.8.17->1.7.8.18 Index: squid/src/win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/win32.c,v retrieving revision 1.7.8.17 retrieving revision 1.7.8.18 diff -u -r1.7.8.17 -r1.7.8.18 --- squid/src/win32.c 29 Oct 2006 08:06:42 -0000 1.7.8.17 +++ squid/src/win32.c 29 Oct 2006 08:12:20 -0000 1.7.8.18 @@ -226,22 +226,21 @@ GetOSVersion() { OSVERSIONINFOEX osvi; - BOOL bOsVersionInfoEx; + BOOL bOsVersionInfoEx; safe_free(WIN32_OS_string); memset(&osvi, '\0', sizeof(OSVERSIONINFOEX)); - /* Try calling GetVersionEx using the OSVERSIONINFOEX structure. - If that fails, try using the OSVERSIONINFO structure. -*/ - - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - - if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) ) - { - osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) ) - goto GetVerError; - } + /* Try calling GetVersionEx using the OSVERSIONINFOEX structure. + * If that fails, try using the OSVERSIONINFO structure. + */ + + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + + if (!(bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) & osvi))) { + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + if (!GetVersionEx((OSVERSIONINFO *) & osvi)) + goto GetVerError; + } switch (osvi.dwPlatformId) { case VER_PLATFORM_WIN32_NT: if (osvi.dwMajorVersion <= 4) { @@ -262,9 +261,9 @@ } if ((osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion == 0)) { if (osvi.wProductType == VER_NT_WORKSTATION) - WIN32_OS_string = xstrdup("Windows Vista"); - else - WIN32_OS_string = xstrdup("Windows Server \"Longhorn\""); + WIN32_OS_string = xstrdup("Windows Vista"); + else + WIN32_OS_string = xstrdup("Windows Server \"Longhorn\""); return _WIN_OS_WINLON; } break; @@ -289,7 +288,7 @@ default: break; } -GetVerError: + GetVerError: WIN32_OS_string = xstrdup("Unknown Windows system"); return _WIN_OS_UNKNOWN; }