fw-update: Fix variable being used before initialized
Initialize "totalNumComponentUpdates" and "compUpdateCompletedCount" to
0 to avoid potential errors caused by uninitialized variables.
Change-Id: I27f57330e77f98109a09b3270a3dd6fd50e8fb52
Signed-off-by: DelphineCCChiu <delphine_cc_chiu@wiwynn.com>
diff --git a/fw-update/update_manager.hpp b/fw-update/update_manager.hpp
index b47f89d..780ce49 100644
--- a/fw-update/update_manager.hpp
+++ b/fw-update/update_manager.hpp
@@ -52,7 +52,8 @@
handler(handler), instanceIdDb(instanceIdDb),
descriptorMap(descriptorMap), componentInfoMap(componentInfoMap),
watch(event.get(),
- std::bind_front(&UpdateManager::processPackage, this))
+ std::bind_front(&UpdateManager::processPackage, this)),
+ totalNumComponentUpdates(0), compUpdateCompletedCount(0)
{}
/** @brief Handle PLDM request for the commands in the FW update