sched/env: Don't need copy env variable from parent in env_dup

since caller always pass them if needed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-10-16 21:24:29 +08:00 committed by Masayuki Ishikawa
parent e2a18ad339
commit aed85964ff

View File

@ -63,7 +63,6 @@
int env_dup(FAR struct task_group_s *group, FAR char * const *envcp) int env_dup(FAR struct task_group_s *group, FAR char * const *envcp)
{ {
FAR struct tcb_s *ptcb = this_task();
FAR char **envp = NULL; FAR char **envp = NULL;
size_t envc = 0; size_t envc = 0;
int ret = OK; int ret = OK;
@ -78,7 +77,7 @@ int env_dup(FAR struct task_group_s *group, FAR char * const *envcp)
/* Is there an environment ? */ /* Is there an environment ? */
if (envcp || (envcp = ptcb->group->tg_envp) != NULL) if (envcp != NULL)
{ {
/* Count the strings */ /* Count the strings */