You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/07/31 07:47:48 UTC
[nuttx] branch master updated: task_spawnparms: out of loop when ret less than 0
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e50d1211df task_spawnparms: out of loop when ret less than 0
e50d1211df is described below
commit e50d1211df09a6b96568d2ac1915a06fb90ca07a
Author: zhangyuan21 <zh...@xiaomi.com>
AuthorDate: Fri Jul 28 16:10:40 2023 +0800
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 <zh...@xiaomi.com>
---
sched/task/task_spawnparms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sched/task/task_spawnparms.c b/sched/task/task_spawnparms.c
index 2813713534..c3198def2e 100644
--- a/sched/task/task_spawnparms.c
+++ b/sched/task/task_spawnparms.c
@@ -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)