firmware: slight code re-order to improve clarity
Set the state in the try condition so that it's more clear that we only
want to do this if the above line didn't throw an exception.
Change-Id: I5f389b4787efa16502beeeb196a8543861707d56
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 3c47e51..5e44397 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -604,6 +604,7 @@
try
{
bus.call_noreply(method);
+ state = UpdateState::verificationStarted;
}
catch (const sdbusplus::exception::SdBusError& ex)
{
@@ -613,9 +614,6 @@
return false;
}
- state = UpdateState::verificationStarted;
-
- /* TODO: implement this. */
return true;
}