summaryrefslogtreecommitdiff
path: root/nuttx/binfmt
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r--nuttx/binfmt/binfmt_exec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nuttx/binfmt/binfmt_exec.c b/nuttx/binfmt/binfmt_exec.c
index 8a25445c0..2305f6d63 100644
--- a/nuttx/binfmt/binfmt_exec.c
+++ b/nuttx/binfmt/binfmt_exec.c
@@ -96,24 +96,23 @@ int exec(FAR const char *filename, FAR const char **argv,
{
struct binary_s bin;
int ret;
- int i;
memset(&bin, 0, sizeof(struct binary_s));
bin.filename = filename;
bin.exports = exports;
- bin.nexports = NEXPORTS;
+ bin.nexports = nexports;
ret = load_module(&bin);
if (ret < 0)
{
- bdbg("ERROR: Failed to load program '%s'\n", dirlist[i]);
+ bdbg("ERROR: Failed to load program '%s'\n", filename);
return ERROR;
}
ret = exec_module(&bin, 50);
if (ret < 0)
{
- bdbg("ERROR: Failed to execute program '%s'\n", dirlist[i]);
+ bdbg("ERROR: Failed to execute program '%s'\n", filename);
unload_module(&bin);
return ERROR;
}