!1478 修改逻辑重复的冗余代码

Merge pull request !1478 from 陈诺/0923
This commit is contained in:
openharmony_ci 2024-09-24 08:48:24 +00:00 committed by Gitee
commit e6a0a135f1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -60,8 +60,6 @@ static int VarCurrentUseIdReplace(const SandboxContext *context,
int len = 0;
if (extraData == NULL || !CHECK_FLAGS_BY_INDEX(extraData->operation, SANDBOX_TAG_PERMISSION)) {
len = sprintf_s((char *)buffer, bufferLen, "%u", info->uid / UID_BASE);
} else if (context->appFullMountEnable && strlen(info->userName) > 0) {
len = sprintf_s((char *)buffer, bufferLen, "%s", "currentUser");
} else {
len = sprintf_s((char *)buffer, bufferLen, "%s", "currentUser");
}