task_spawnparms: out of loop when ret less than 0

The nxspawn_dup2 function will return a value greater than 0,
so the loop should only exit if ret is less than 0.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-07-28 16:10:40 +08:00 committed by Xiang Xiao
parent c6f32f4363
commit e50d1211df

View File

@ -274,7 +274,7 @@ int spawn_file_actions(FAR struct tcb_s *tcb,
/* Execute each file action */
for (entry = (FAR struct spawn_general_file_action_s *)actions;
entry && ret == OK;
entry && ret >= 0;
entry = entry->flink)
{
switch (entry->action)