This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 76803f4a0776674c0e6b11a4761024a758231925
Author: Xiang Xiao <[email protected]>
AuthorDate: Thu Apr 21 19:22:10 2022 +0800

    sched/environ: Replace get_environ_ptr with environ
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 binfmt/binfmt_execmodule.c | 2 +-
 sched/task/task_vfork.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c
index e56903bc3f..59188577dc 100644
--- a/binfmt/binfmt_execmodule.c
+++ b/binfmt/binfmt_execmodule.c
@@ -153,7 +153,7 @@ int exec_module(FAR const struct binary_s *binp,
 
   /* Make a copy of the environment here */
 
-  if (envp || (envp = get_environ_ptr()))
+  if (envp || (envp = environ))
     {
       envp = binfmt_copyenv(envp);
       if (!envp)
diff --git a/sched/task/task_vfork.c b/sched/task/task_vfork.c
index 64e1f7d35c..f535614c62 100644
--- a/sched/task/task_vfork.c
+++ b/sched/task/task_vfork.c
@@ -154,7 +154,7 @@ FAR struct task_tcb_s *nxtask_setup_vfork(start_t retaddr)
 
   /* Duplicate the parent tasks environment */
 
-  ret = env_dup(child->cmn.group, get_environ_ptr());
+  ret = env_dup(child->cmn.group, environ);
   if (ret < 0)
     {
       goto errout_with_tcb;

Reply via email to