From eb02289bfd84508700abb60da553095a3bb981c5 Mon Sep 17 00:00:00 2001 From: LeonShu Date: Fri, 13 Jun 2025 19:55:53 +0800 Subject: [PATCH 1/2] codex Signed-off-by: LeonShu --- services/applypatch/command_process.cpp | 5 +---- services/updater_main.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/services/applypatch/command_process.cpp b/services/applypatch/command_process.cpp index dba56dfb..43dab344 100644 --- a/services/applypatch/command_process.cpp +++ b/services/applypatch/command_process.cpp @@ -229,10 +229,7 @@ CommandResult DiffAndMoveCommandFn::Execute(const Command ¶ms) BlockSet targetBlock; std::vector buffer; CommandResult result = FAILED; - if (!LoadTarget(params, pos, buffer, targetBlock, result)) { - return result; - } - if (!params.GetTransferParams()->canWrite) { + if (!LoadTarget(params, pos, buffer, targetBlock, result) || !params.GetTransferParams()->canWrite) { return result; } diff --git a/services/updater_main.cpp b/services/updater_main.cpp index d30ad727..eda9db2c 100644 --- a/services/updater_main.cpp +++ b/services/updater_main.cpp @@ -906,7 +906,7 @@ __attribute__((weak)) UpdaterStatus CheckAndSetSlot([[maybe_unused]]UpdaterParam { LOG(INFO) << "not need check and set slot"; #ifndef UPDATER_UT - SetActiveSlot(); //UPDATER_AB_SUPPORT + SetActiveSlot(); // UPDATER_AB_SUPPORT #endif return UPDATE_SUCCESS; } -- Gitee From d21d8f91ab5fcaba6f1ae37d1e657ee27673bbd8 Mon Sep 17 00:00:00 2001 From: LeonShu Date: Fri, 13 Jun 2025 20:03:45 +0800 Subject: [PATCH 2/2] codex Signed-off-by: LeonShu --- services/updater_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/updater_main.cpp b/services/updater_main.cpp index eda9db2c..79711859 100644 --- a/services/updater_main.cpp +++ b/services/updater_main.cpp @@ -906,7 +906,7 @@ __attribute__((weak)) UpdaterStatus CheckAndSetSlot([[maybe_unused]]UpdaterParam { LOG(INFO) << "not need check and set slot"; #ifndef UPDATER_UT - SetActiveSlot(); // UPDATER_AB_SUPPORT + SetActiveSlot(); // UPDATER_AB_SUPPORT #endif return UPDATE_SUCCESS; } -- Gitee