Skip to content
Snippets Groups Projects
Commit 9e290c10 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Fix some compile issues introduces with removal of CONFIG_MAX_TASK_ARGS

parent db12ac1f
No related branches found
No related tags found
No related merge requests found
......@@ -138,9 +138,9 @@ static inline int binfmt_copyargv(FAR struct binary_s *bin, FAR char * const *ar
/* Copy the argv list */
binp->argv = (FAR char **)bin->argbuffer;
ptr = bin->argbuffer + argvsize;
for (; i < argv[i]; i++)
bin->argv = (FAR char **)bin->argbuffer;
ptr = bin->argbuffer + argvsize;
for (; argv[i]; i++)
{
bin->argv[i] = ptr;
argsize = strlen(argv[i]) + 1;
......
......@@ -116,7 +116,9 @@ static inline void vfork_namesetup(FAR struct tcb_s *parent,
static inline int vfork_stackargsetup(FAR struct tcb_s *parent,
FAR struct task_tcb_s *child)
{
/* Is the parent a task? or a pthread? */
/* Is the parent a task? or a pthread? Only tasks (and kernel threads)
* have command line arguments.
*/
child->argv = NULL;
if ((parent->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD)
......@@ -159,6 +161,8 @@ static inline int vfork_stackargsetup(FAR struct tcb_s *parent,
child->argv[argc] = NULL;
}
return OK;
}
/****************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment