diff options
| author | Shell <[email protected]> | 2024-03-30 17:58:38 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-30 17:58:38 +0800 |
| commit | 864055bf1806f1331843379ced674b454b59bfca (patch) | |
| tree | 998720b2f18de67fb122d0930a4a80467ff9389c /components/lwp | |
| parent | 6d1bc9b2f82e7b6c49e3a7fd38ed66aab1ac86d6 (diff) | |
[fixup] aarch64 UMP compiler error (#8677)
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'components/lwp')
| -rw-r--r-- | components/lwp/lwp_internal.c | 2 | ||||
| -rw-r--r-- | components/lwp/lwp_syscall.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/components/lwp/lwp_internal.c b/components/lwp/lwp_internal.c index e460a1ac3f..1fc68f2e73 100644 --- a/components/lwp/lwp_internal.c +++ b/components/lwp/lwp_internal.c @@ -89,7 +89,7 @@ static rt_err_t _mutex_take_safe(rt_mutex_t mtx, rt_int32_t timeout, int flags) } else { - rc = -RT_EINVAL; + rc = -RT_ERROR; LOG_W("%s: mtx should not be NULL", __func__); RT_ASSERT(0); } diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 5d9cf05b63..585101b71f 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -2700,7 +2700,7 @@ sysret_t sys_execve(const char *path, char *const argv[], char *const envp[]) */ RT_ASSERT(rt_list_entry(lwp->t_grp.prev, struct rt_thread, sibling) == thread); - strncpy(thread->parent.name, run_name + last_backslash, RT_NAME_MAX); + strncpy(thread->parent.name, run_name + last_backslash, RT_NAME_MAX - 1); strncpy(lwp->cmd, new_lwp->cmd, RT_NAME_MAX); rt_free(lwp->exe_file); lwp->exe_file = strndup(new_lwp->exe_file, DFS_PATH_MAX); |
