From bc18e5517ccfa15bd5239e71a624d8deadecfb35 Mon Sep 17 00:00:00 2001 From: j21p3 Date: Mon, 15 Jul 2024 10:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9fd28418d104f04d5e80ce922718957b92b53f14 Signed-off-by: j21p3 --- services/sandbox_manager/main/cpp/src/mac/mac_adapter.cpp | 8 ++++---- .../main/cpp/src/service/policy_info_manager.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/sandbox_manager/main/cpp/src/mac/mac_adapter.cpp b/services/sandbox_manager/main/cpp/src/mac/mac_adapter.cpp index a4af596..012ea99 100644 --- a/services/sandbox_manager/main/cpp/src/mac/mac_adapter.cpp +++ b/services/sandbox_manager/main/cpp/src/mac/mac_adapter.cpp @@ -124,8 +124,8 @@ int32_t MacAdapter::SetSandboxPolicy(uint32_t tokenId, const std::vector( + std::count_if(result.begin(), result.end(), [](uint32_t res) { return res != SANDBOX_MANAGER_OK; })); if (failCount > 0) { SANDBOXMANAGER_LOG_WARN(LABEL, "Set policy has failed items, failCount=%{public}u.", failCount); } @@ -209,7 +209,7 @@ int32_t MacAdapter::CheckSandboxPolicy(uint32_t tokenId, const std::vector(std::count(result.begin(), result.end(), false)); if (failCount > 0) { SANDBOXMANAGER_LOG_WARN(LABEL, "Check policy has failed items, failCount=%{public}u.", failCount); } @@ -251,7 +251,7 @@ int32_t MacAdapter::UnSetSandboxPolicy(uint32_t tokenId, const std::vector(std::count(result.begin(), result.end(), false)); if (failCount > 0) { SANDBOXMANAGER_LOG_WARN(LABEL, "Unset policy has failed items, failCount=%{public}u.", failCount); } diff --git a/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp b/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp index b95cf7e..e6b2c3b 100644 --- a/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp +++ b/services/sandbox_manager/main/cpp/src/service/policy_info_manager.cpp @@ -333,7 +333,7 @@ int32_t PolicyInfoManager::SetPolicy(uint32_t tokenId, const std::vector(res); } } -- Gitee