diff --git a/services/firmware/check/include/firmware_icheck.h b/services/firmware/check/include/firmware_icheck.h index 4fc02ee..def394f 100644 --- a/services/firmware/check/include/firmware_icheck.h +++ b/services/firmware/check/include/firmware_icheck.h @@ -165,8 +165,8 @@ private: } RequestType requestType_ = RequestType::CHECK; - Duration duration_ {}; - CheckAndAuthInfo checkAndAuthInfo_ {}; + Duration duration_; + CheckAndAuthInfo checkAndAuthInfo_; std::vector checkResultList_; }; } // namespace UpdateEngine diff --git a/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h b/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h index fdddae5..bdc43c4 100644 --- a/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h +++ b/services/firmware/upgrade/data_processor/include/firmware_check_data_processor.h @@ -57,7 +57,7 @@ private: private: std::vector componentList_; - Duration duration_ {}; + Duration duration_; bool isSameWithDb_ = true; CheckStatus status_ = CheckStatus::CHECK_FAIL; }; diff --git a/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h b/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h index 732667b..189bfaf 100644 --- a/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h +++ b/services/firmware/upgrade/data_processor/include/firmware_download_data_processor.h @@ -37,8 +37,8 @@ private: void GetTask(); private: - FirmwareTask tasks_ {}; - Progress downloadProgress_ {}; + FirmwareTask tasks_; + Progress downloadProgress_; }; } // namespace UpdateEngine } // namespace OHOS diff --git a/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h b/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h index 117a170..a02c066 100644 --- a/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h +++ b/services/firmware/upgrade/data_processor/include/firmware_install_data_processor.h @@ -36,7 +36,7 @@ private: void GetTask(); private: - FirmwareTask tasks_ {}; + FirmwareTask tasks_; }; } // namespace UpdateEngine } // namespace OHOS diff --git a/services/firmware/upgrade/executor/include/firmware_check_executor.h b/services/firmware/upgrade/executor/include/firmware_check_executor.h index c931e72..c341eb9 100644 --- a/services/firmware/upgrade/executor/include/firmware_check_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_check_executor.h @@ -36,9 +36,9 @@ private: void Complete(); private: - FirmwareCheckComponentCallback checkComponentCallback_ {}; - Duration duration_ {}; - CheckAndAuthInfo checkAndAuthInfo_ {}; + FirmwareCheckComponentCallback checkComponentCallback_; + Duration duration_; + CheckAndAuthInfo checkAndAuthInfo_; std::vector componentList_; CheckStatus status_ = CheckStatus::CHECK_SUCCESS; }; diff --git a/services/firmware/upgrade/executor/include/firmware_download_executor.h b/services/firmware/upgrade/executor/include/firmware_download_executor.h index 5105014..809affb 100644 --- a/services/firmware/upgrade/executor/include/firmware_download_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_download_executor.h @@ -39,10 +39,10 @@ private: bool VerifyDownloadPkg(const std::string &pkgName, Progress &progress); private: - DownloadOptions downloadOptions_ {}; + DownloadOptions downloadOptions_; std::vector components_; - FirmwareProgressCallback firmwareProgressCallback_ {}; - FirmwareTask tasks_ {}; + FirmwareProgressCallback firmwareProgressCallback_; + FirmwareTask tasks_; UpgradeStatus upgradeStatus_; std::shared_ptr downloadThread_ = nullptr; }; diff --git a/services/firmware/upgrade/executor/include/firmware_install_executor.h b/services/firmware/upgrade/executor/include/firmware_install_executor.h index 5580552..de2fb9b 100644 --- a/services/firmware/upgrade/executor/include/firmware_install_executor.h +++ b/services/firmware/upgrade/executor/include/firmware_install_executor.h @@ -43,8 +43,8 @@ private: FirmwareInstallExecutorCallback installCallback_; InstallCallbackInfo installCallbackInfo_; std::vector components_; - FirmwareTask tasks_ {}; - Progress taskProgress_ {}; + FirmwareTask tasks_; + Progress taskProgress_; std::shared_ptr preferencesUtil_ = DelayedSingleton::GetInstance(); }; diff --git a/services/firmware/upgrade/install/include/firmware_sys_installer_install.h b/services/firmware/upgrade/install/include/firmware_sys_installer_install.h index f43bdf5..65954ee 100644 --- a/services/firmware/upgrade/install/include/firmware_sys_installer_install.h +++ b/services/firmware/upgrade/install/include/firmware_sys_installer_install.h @@ -40,7 +40,7 @@ private: int32_t WaitInstallResult(); private: - Progress sysInstallProgress_ {}; + Progress sysInstallProgress_; }; } // namespace UpdateEngine } // namespace OHOS diff --git a/services/firmware/upgrade/mode/include/firmware_download_mode.h b/services/firmware/upgrade/mode/include/firmware_download_mode.h index 2d9abc4..ca2499c 100644 --- a/services/firmware/upgrade/mode/include/firmware_download_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_download_mode.h @@ -52,10 +52,10 @@ private: private: FirmwareDownloadDataProcessor downloadDataProcessor_; - DownloadOptions downloadOptions_ {}; + DownloadOptions downloadOptions_; BusinessError &businessError_; OnExecuteFinishCallback onExecuteFinishCallback_; - FirmwareTask tasks_ {}; + FirmwareTask tasks_; }; } // namespace UpdateEngine } // namespace OHOS diff --git a/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h b/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h index 964b8de..e102de4 100644 --- a/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_install_apply_mode.h @@ -60,7 +60,7 @@ private: BusinessError &businessError_; InstallType installType_; OnExecuteFinishCallback onExecuteFinishCallback_; - FirmwareTask tasks_ {}; + FirmwareTask tasks_; std::shared_ptr preferencesUtil_ = DelayedSingleton::GetInstance(); }; diff --git a/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h b/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h index 062d89a..89d2789 100644 --- a/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h +++ b/services/firmware/upgrade/mode/include/firmware_manual_check_mode.h @@ -40,7 +40,7 @@ private: private: OnCheckComplete onCheckComplete_; FirmwareCheckDataProcessor checkDataProcessor_; - BusinessError businessError_ {}; + BusinessError businessError_; }; } // namespace UpdateEngine } // namespace OHOS diff --git a/services/startup/manage/include/schedule_manager.h b/services/startup/manage/include/schedule_manager.h index b4b8760..418946b 100644 --- a/services/startup/manage/include/schedule_manager.h +++ b/services/startup/manage/include/schedule_manager.h @@ -39,7 +39,7 @@ private: private: std::shared_ptr accessManager_ = nullptr; std::shared_ptr startupSchedule_ = nullptr; - ScheduleTask scheduleTask_ {}; + ScheduleTask scheduleTask_; }; } // namespace UpdateEngine } // namespace OHOS diff --git a/services/utils/src/dupdate_net_observer.cpp b/services/utils/src/dupdate_net_observer.cpp index 604c000..3e245d8 100644 --- a/services/utils/src/dupdate_net_observer.cpp +++ b/services/utils/src/dupdate_net_observer.cpp @@ -44,9 +44,6 @@ void NetObserver::StartObserver() netSpecifier.ident_ = ""; netSpecifier.netCapabilities_ = netAllCapabilities; sptr specifier = new NetSpecifier(netSpecifier); - if (specifier == nullptr) { - return; - } constexpr int32_t RETRY_MAX_TIMES = 10; int32_t retryCount = 0; int32_t ret = NetConnResultCode::NET_CONN_SUCCESS;