diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c index dd3dd86211..82471ce38d 100644 --- a/sched/sched/sched_waitid.c +++ b/sched/sched/sched_waitid.c @@ -204,7 +204,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) #ifdef CONFIG_SCHED_CHILD_STATUS /* Does this task retain child status? */ - retains = ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0); + retains = ((rtcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0); if (rtcb->group->tg_children == NULL && retains) { diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c index aca86d093f..6d2bc82680 100644 --- a/sched/sched/sched_waitpid.c +++ b/sched/sched/sched_waitpid.c @@ -346,7 +346,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) #ifdef CONFIG_SCHED_CHILD_STATUS /* Does this task retain child status? */ - retains = ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0); + retains = ((rtcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0); if (rtcb->group->tg_children == NULL && retains) { diff --git a/sched/task/task_reparent.c b/sched/task/task_reparent.c index b7fe508bad..075a391940 100644 --- a/sched/task/task_reparent.c +++ b/sched/task/task_reparent.c @@ -163,7 +163,7 @@ int task_reparent(pid_t ppid, pid_t chpid) { /* Has the new parent's task group supressed child exit status? */ - if ((pgrp->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) + if ((pgrp->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) { /* No.. Add the child status entry to the new parent's task group */ @@ -186,7 +186,7 @@ int task_reparent(pid_t ppid, pid_t chpid) * suppressed child exit status. */ - ret = ((ogrp->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK; + ret = ((ogrp->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK; } #else /* CONFIG_SCHED_CHILD_STATUS */ @@ -276,7 +276,7 @@ int task_reparent(pid_t ppid, pid_t chpid) { /* Has the new parent's task group supressed child exit status? */ - if ((ptcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) + if ((ptcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) { /* No.. Add the child status entry to the new parent's task group */ @@ -299,7 +299,7 @@ int task_reparent(pid_t ppid, pid_t chpid) * suppressed child exit status. */ - ret = ((otcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK; + ret = ((otcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK; } #else /* CONFIG_SCHED_CHILD_STATUS */ diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c index b3f89abb67..6c591a16c8 100644 --- a/sched/task/task_setup.c +++ b/sched/task/task_setup.c @@ -237,7 +237,7 @@ static inline void task_saveparent(FAR struct tcb_s *tcb, uint8_t ttype) * the SA_NOCLDWAIT flag with sigaction(). */ - if ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) + if ((rtcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) { FAR struct child_status_s *child;