From 484ed4f195e83300856aa632494accee9e794529 Mon Sep 17 00:00:00 2001 From: lifansheng Date: Tue, 14 Sep 2021 18:54:29 +0800 Subject: [PATCH] modify codecheck Signed-off-by: lifansheng --- api/js_url.cpp | 6 ++---- api/native_module_api.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/api/js_url.cpp b/api/js_url.cpp index 1fee49b..64f62e9 100755 --- a/api/js_url.cpp +++ b/api/js_url.cpp @@ -18,9 +18,7 @@ #include #include "securec.h" #include "utils/log.h" - namespace OHOS::Api { - static std::map g_head = { {"ftp:", 21}, {"file:", -1}, {"gopher:", 70}, {"http:", 80}, {"https:", 443}, {"ws:", 80}, {"wss:", 443} @@ -32,7 +30,7 @@ namespace OHOS::Api { }; static std::vector g_singlesegment = { ".", "%2e", "%2E" }; - + static std::vector g_specialcharacter = { '\0', '\t', '\n', '\r', ' ', '#', '%', '/', ':', '?', '@', '[', '\\', ']' @@ -167,7 +165,7 @@ namespace OHOS::Api { input[i] = tolower(input[i]); } if (!isalnum(input[i]) && input[i] != '+' && input[i] != '-' && input[i] != '.') { - flags.set(static_cast(BitsetStatusFlag::BIT0)); + flags.set(static_cast(BitsetStatusFlag::BIT0)); // 0:Bit 0 Set to true,The URL analysis failed return false; } diff --git a/api/native_module_api.cpp b/api/native_module_api.cpp index 509cf7f..1a2b1ab 100755 --- a/api/native_module_api.cpp +++ b/api/native_module_api.cpp @@ -1,16 +1,16 @@ /* - *Copyright (c) 2021 Huawei Device Co., Ltd. - *Licensed under the Apache License, Version 2.0 (the "License"); - *you may not use this file except in compliance with the License. - *You may obtain a copy of the License at + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - *See the License for the specific language governing permissions and - *limitations under the License. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "napi/native_api.h"