Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4ea37db

Browse files
Squash2
1 parent 928bccb commit 4ea37db

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/utilcode/clrconfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ DWORD CLRConfig::GetConfigValue(const ConfigDWORDInfo & info, bool acceptExplici
391391
// If we are willing to accept the default value when it's set explicitly,
392392
// checking the HRESULT here is sufficient. E_FAIL is returned when the
393393
// default is used.
394-
if (hr != E_FAIL)
394+
if (SUCCEEDED(hr))
395395
{
396396
*isDefault = false;
397397
return resultMaybe;
@@ -456,7 +456,7 @@ DWORD CLRConfig::GetConfigValue(const ConfigDWORDInfo & info, bool acceptExplici
456456
// If we are willing to accept the default value when it's set explicitly,
457457
// checking the HRESULT here is sufficient. E_FAIL is returned when the
458458
// default is used.
459-
if (hr != E_FAIL)
459+
if if (SUCCEEDED(hr))
460460
{
461461
*isDefault = false;
462462
return resultMaybe;

src/utilcode/configuration.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ static LPCWSTR GetConfigurationValue(LPCWSTR name)
4040

4141
for (int i = 0; i < numberOfKnobs; ++i)
4242
{
43-
if (knobNames[i] != nullptr && (wcscmp(name, knobNames[i]) == 0))
43+
_ASSERT(knobNames[i] != nullptr);
44+
if (wcscmp(name, knobNames[i]) == 0)
4445
{
4546
return knobValues[i];
4647
}

0 commit comments

Comments
 (0)