diff options
| author | Patrick Venture <venture@google.com> | 2019-05-28 15:57:21 -0700 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2019-05-28 15:57:21 -0700 |
| commit | c674474c6b4f665c7584fbcd9d27f35c0e4190ef (patch) | |
| tree | 722c8dcf427e63dcfbea70ac30e25642ca21e277 /tools | |
| parent | 0f82ce40757a3a5dedf419baf7da2d76ccc67750 (diff) | |
| download | phosphor-ipmi-flash-c674474c6b4f665c7584fbcd9d27f35c0e4190ef.tar.gz phosphor-ipmi-flash-c674474c6b4f665c7584fbcd9d27f35c0e4190ef.zip | |
tools: updater: cppcheck fixups
The scope of the variable 'commandAttempts' can be reduced.
The scope of the variable 'attempts' can be reduced.
The scope of the variable 'exitLoop' can be reduced.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib2e258c1af7110ff4568695b8f1ea877a9ffef99
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/updater.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/updater.cpp b/tools/updater.cpp index afef26e..0819c80 100644 --- a/tools/updater.cpp +++ b/tools/updater.cpp @@ -114,14 +114,15 @@ bool pollVerificationStatus(std::uint16_t session, using namespace std::chrono_literals; static constexpr auto verificationSleep = 5s; - static constexpr int commandAttempts = 20; - int attempts = 0; - bool exitLoop = false; ipmi_flash::VerifyCheckResponses result = ipmi_flash::VerifyCheckResponses::other; try { + static constexpr int commandAttempts = 20; + int attempts = 0; + bool exitLoop = false; + /* Reach back the current status from the verification service output. */ while (attempts++ < commandAttempts) |

