cleanup: remove several redundant conditions found by cppcheck (dotnet/coreclr#27001)
authorIlya Shipitsin <chipitsine@gmail.com>
Wed, 9 Oct 2019 00:14:04 +0000 (05:14 +0500)
committerJan Kotas <jkotas@microsoft.com>
Wed, 9 Oct 2019 00:14:04 +0000 (17:14 -0700)
commiteb1e3d8c901351918d4dcf59f4bd9ca6007baaa2
tree55a2ef955168065aca883877685a6a0ef16da4c3
parent9282775175fc49cd96fd6a99e64448123fd05bfa
cleanup: remove several redundant conditions found by cppcheck (dotnet/coreclr#27001)

* src/utilcode/ilformatter.cpp: remove redundant condition

[src/utilcode/ilformatter.cpp:274] -> [src/utilcode/ilformatter.cpp:278]: (warning) Identical inner 'if' condition is always true.
[src/utilcode/ilformatter.cpp:285] -> [src/utilcode/ilformatter.cpp:287]: (warning) Identical inner 'if' condition is always true.

* src/utilcode/regutil.cpp: remove redundant condition

[src/utilcode/regutil.cpp:57] -> [src/utilcode/regutil.cpp:64]: (style) The if condition is the same as the previous if condition

* src/utilcode/loaderheap.cpp: remove redundant condition

[src/utilcode/loaderheap.cpp:860] -> [src/utilcode/loaderheap.cpp:865]: (style) The if condition is the same as the previous if condition

* src/pal/src/synchobj/mutex.cpp: remove redundant condition

[src/pal/src/synchobj/mutex.cpp:1273] -> [src/pal/src/synchobj/mutex.cpp:1298]: (style) The if condition is the same as the previous if condition

* src/utilcode/ilformatter.cpp: add closing bracket back
(occasionaely deleted in previous commit)

Commit migrated from https://github.com/dotnet/coreclr/commit/c44fd8cce65fb77a718459d0c9af983d4e325788
src/coreclr/src/pal/src/synchobj/mutex.cpp
src/coreclr/src/utilcode/ilformatter.cpp
src/coreclr/src/utilcode/loaderheap.cpp
src/coreclr/src/utilcode/regutil.cpp