From dc4b8c482241ebaad3535cd6c5b91c26be5fdf82 Mon Sep 17 00:00:00 2001 From: Xu Jun <693788454@qq.com> Date: Wed, 23 Sep 2020 11:50:37 +0800 Subject: [PATCH] remove errno in wasm_application_execute_func (#396) --- .github/workflows/linux.yml | 5 ++++- .github/workflows/mac.yml | 5 ++++- core/iwasm/common/wasm_runtime_common.c | 9 --------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1f941b68..fcb3a2eb 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,7 +1,10 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: Linux # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +# events but only for the main branch on: push: branches: [ main ] diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 134f4c1e..f81e46f6 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -1,7 +1,10 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + name: Mac # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +# events but only for the main branch on: push: branches: [ main ] diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index 6c50fa2c..abd2d752 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -2369,9 +2369,6 @@ wasm_application_execute_func(WASMModuleInstanceCommon *module_inst, goto fail; } - /* Clear errno before parsing arguments */ - errno = 0; - /* Parse arguments */ for (i = 0, p = 0; i < argc; i++) { char *endptr = NULL; @@ -2462,12 +2459,6 @@ wasm_application_execute_func(WASMModuleInstanceCommon *module_inst, wasm_runtime_set_exception(module_inst, buf); goto fail; } - if (errno != 0) { - snprintf(buf, sizeof(buf), - "prepare function argument error, errno: %d", errno); - wasm_runtime_set_exception(module_inst, buf); - goto fail; - } } bh_assert(p == (int32)argc1);