Skip to content

Commit 5957423

Browse files
committed
Formatting
1 parent b4019ef commit 5957423

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

MSVC/dllmain.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ static int GetDllVersion(const wchar_t* path, Version* out_version) {
2727
}
2828

2929
VS_FIXEDFILEINFO* fileInfo;
30-
UINT len = 0;
30+
UINT len = 0;
3131
if ( !VerQueryValueA(buffer, "\\", (LPVOID*)&fileInfo, &len) ) {
3232
c4log(kC4DefaultLog, kC4LogVerbose, "VerQueryValueA failed: %lu", GetLastError());
3333
free(buffer);
3434
return 0;
3535
}
3636

37-
if (fileInfo) {
37+
if ( fileInfo ) {
3838
out_version->major = HIWORD(fileInfo->dwFileVersionMS);
3939
out_version->minor = LOWORD(fileInfo->dwFileVersionMS);
4040
out_version->build = HIWORD(fileInfo->dwFileVersionLS);
@@ -58,17 +58,15 @@ static int CompareVersions(const Version* a, const Version* b) {
5858

5959
void CheckCppRuntime() {
6060
HMODULE hMod = GetModuleHandleA("msvcp140.dll");
61-
if (!hMod) {
62-
hMod = LoadLibraryA("msvcp140d.dll");
63-
}
61+
if ( !hMod ) { hMod = LoadLibraryA("msvcp140d.dll"); }
6462

6563
if ( !hMod ) {
6664
c4log(kC4DefaultLog, kC4LogWarning, "msvcp140.dll not loaded yet, unable to check version...");
6765
return;
6866
}
6967

7068
wchar_t path[MAX_PATH];
71-
if (GetModuleFileNameW(hMod, path, MAX_PATH) == 0) {
69+
if ( GetModuleFileNameW(hMod, path, MAX_PATH) == 0 ) {
7270
c4log(kC4DefaultLog, kC4LogWarning, "Unable to determine msvcp140.dll filename to check version...");
7371
return;
7472
}
@@ -83,8 +81,8 @@ void CheckCppRuntime() {
8381
int cmp = CompareVersions(&loaded, &expected);
8482
if ( cmp < 0 ) {
8583
c4log(kC4DefaultLog, kC4LogWarning, "msvcp140.dll version is older than expected: %u.%u.%u.%u < %u.%u.%u.%u",
86-
loaded.major, loaded.minor, loaded.revision, loaded.build,
87-
expected.major, expected.minor, expected.revision, expected.build);
84+
loaded.major, loaded.minor, loaded.revision, loaded.build, expected.major, expected.minor,
85+
expected.revision, expected.build);
8886
c4log(kC4DefaultLog, kC4LogWarning, "This may cause instability in your application");
8987
}
9088
}

0 commit comments

Comments
 (0)