From 3078a4cb67f54922d50c66f227659b9b1d81a0a1 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Mon, 28 Aug 2017 16:14:22 -0700 Subject: [PATCH] wifi(implementation): Remove unnecessary local variable Bug: 65058323 Test: Compiles Change-Id: Ib268234837f5b381572c8038e7900a145fb32249 --- wifi/1.1/default/wifi.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wifi/1.1/default/wifi.cpp b/wifi/1.1/default/wifi.cpp index 1741af44ba..c46ef950e9 100644 --- a/wifi/1.1/default/wifi.cpp +++ b/wifi/1.1/default/wifi.cpp @@ -185,9 +185,8 @@ WifiStatus Wifi::initializeLegacyHal() { WifiStatus Wifi::stopLegacyHalAndDeinitializeModeController( /* NONNULL */ std::unique_lock* lock) { run_state_ = RunState::STOPPING; - const auto on_complete_callback_ = [&]() { run_state_ = RunState::STOPPED; }; legacy_hal::wifi_error legacy_status = - legacy_hal_->stop(lock, on_complete_callback_); + legacy_hal_->stop(lock, [&]() { run_state_ = RunState::STOPPED; }); if (legacy_status != legacy_hal::WIFI_SUCCESS) { LOG(ERROR) << "Failed to stop legacy HAL: " << legacyErrorToString(legacy_status);