diff --git a/services/backup_sa/src/module_ipc/svc_session_manager.cpp b/services/backup_sa/src/module_ipc/svc_session_manager.cpp index f40291e698e5f908497e4204b483766de2874944..030e0ddff6ad149d7d3077caec29542936f7a220 100644 --- a/services/backup_sa/src/module_ipc/svc_session_manager.cpp +++ b/services/backup_sa/src/module_ipc/svc_session_manager.cpp @@ -411,7 +411,7 @@ bool SvcSessionManager::IsOnAllBundlesFinished() throw BError(BError::Codes::SA_INVAL_ARG, "No caller token was specified"); } auto iter = find_if(impl_.backupExtNameMap.begin(), impl_.backupExtNameMap.end(), - [](auto &it) { return it.second.isBundleFinished == false; }); + [](const auto &it) { return it.second.isBundleFinished == false; }); if (iter == impl_.backupExtNameMap.end() && impl_.isAppendFinish) { return true; } @@ -482,7 +482,7 @@ bool SvcSessionManager::GetNeedToInstall(const std::string &bundleName) bool SvcSessionManager::NeedToUnloadService() { unique_lock lock(lock_); - if (!impl_.clientToken || !impl_.clientToken || !impl_.clientProxy || !impl_.backupExtNameMap.size()) { + if (!impl_.clientToken || !impl_.clientProxy || !impl_.backupExtNameMap.size()) { return true; } return false;