Fix some compile issues introduces with removal of CONFIG_MAX_TASK_ARGS

This commit is contained in:
Gregory Nutt 2014-11-14 09:53:11 -06:00
parent db12ac1f14
commit 9e290c10b5
2 changed files with 8 additions and 4 deletions

View File

@ -138,9 +138,9 @@ static inline int binfmt_copyargv(FAR struct binary_s *bin, FAR char * const *ar
/* Copy the argv list */ /* Copy the argv list */
binp->argv = (FAR char **)bin->argbuffer; bin->argv = (FAR char **)bin->argbuffer;
ptr = bin->argbuffer + argvsize; ptr = bin->argbuffer + argvsize;
for (; i < argv[i]; i++) for (; argv[i]; i++)
{ {
bin->argv[i] = ptr; bin->argv[i] = ptr;
argsize = strlen(argv[i]) + 1; argsize = strlen(argv[i]) + 1;

View File

@ -116,7 +116,9 @@ static inline void vfork_namesetup(FAR struct tcb_s *parent,
static inline int vfork_stackargsetup(FAR struct tcb_s *parent, static inline int vfork_stackargsetup(FAR struct tcb_s *parent,
FAR struct task_tcb_s *child) 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; child->argv = NULL;
if ((parent->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD) 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; child->argv[argc] = NULL;
} }
return OK;
} }
/**************************************************************************** /****************************************************************************