diff --git a/sched/environ/env_dup.c b/sched/environ/env_dup.c index f1b351ef4c..6070cc462c 100644 --- a/sched/environ/env_dup.c +++ b/sched/environ/env_dup.c @@ -78,7 +78,7 @@ int env_dup(FAR struct task_group_s *group, FAR char * const *envcp) /* Is there an environment ? */ - if (envcp || (envcp = ptcb->group->tg_envp)) + if (envcp || (envcp = ptcb->group->tg_envp) != NULL) { /* Count the strings */