summaryrefslogtreecommitdiff
path: root/update_engine_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'update_engine_client.cc')
-rw-r--r--update_engine_client.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/update_engine_client.cc b/update_engine_client.cc
index eb718410..a721f7a7 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -202,7 +202,7 @@ class UpdateWaitHandler : public ExitingStatusUpdateHandler {
void UpdateWaitHandler::HandleStatusUpdate(const UpdateEngineStatus& status) {
if (exit_on_error_ && status.status == UpdateStatus::IDLE) {
- int last_attempt_error;
+ int last_attempt_error = static_cast<int>(ErrorCode::kSuccess);
ErrorCode code = ErrorCode::kSuccess;
if (client_ && client_->GetLastAttemptError(&last_attempt_error))
code = static_cast<ErrorCode>(last_attempt_error);