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
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 @@
     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)