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-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 1acca2946 Update the call site of exec to accommodate the environment 
variables
1acca2946 is described below

commit 1acca2946ef97592e0b2133db73cc881526e984d
Author: Xiang Xiao <[email protected]>
AuthorDate: Thu Apr 21 11:55:35 2022 +0800

    Update the call site of exec to accommodate the environment variables
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 examples/elf/elf_main.c       | 2 +-
 examples/nxflat/nxflat_main.c | 2 +-
 netutils/thttpd/thttpd_cgi.c  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c
index ebcc5e97a..d571030e7 100644
--- a/examples/elf/elf_main.c
+++ b/examples/elf/elf_main.c
@@ -359,7 +359,7 @@ int main(int argc, FAR char *argv[])
 
       args[0] = (FAR char *)dirlist[i];
       args[1] = NULL;
-      ret = exec(filename, args, g_elf_exports, g_elf_nexports);
+      ret = exec(filename, args, NULL, g_elf_exports, g_elf_nexports);
 
       mm_update(&g_mmstep, "after exec");
 
diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c
index 96fe4c6f6..b1e996da9 100644
--- a/examples/nxflat/nxflat_main.c
+++ b/examples/nxflat/nxflat_main.c
@@ -213,7 +213,7 @@ int main(int argc, FAR char *argv[])
 
       args[0] = (FAR char *)dirlist[i];
       args[1] = NULL;
-      ret = exec(filename, args, g_nxflat_exports, g_nxflat_nexports);
+      ret = exec(filename, args, NULL, g_nxflat_exports, g_nxflat_nexports);
       if (ret < 0)
         {
           errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);
diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c
index 7c6294a4f..5f3ba1a54 100644
--- a/netutils/thttpd/thttpd_cgi.c
+++ b/netutils/thttpd/thttpd_cgi.c
@@ -886,10 +886,10 @@ static int cgi_child(int argc, char **argv)
   ninfo("Starting CGI: %s\n", hc->expnfilename);
 
 #ifdef CONFIG_THTTPD_NXFLAT
-  child = exec(hc->expnfilename, (FAR char * const *)argp,
+  child = exec(hc->expnfilename, argp, NULL,
                g_thttpdsymtab, g_thttpdnsymbols);
 #else
-  child = exec(hc->expnfilename, (FAR char * const *)argp, NULL, 0);
+  child = exec(hc->expnfilename, argp, NULL, NULL, 0);
 #endif
   if (child < 0)
     {

Reply via email to