zyfeier commented on code in PR #8743: URL: https://github.com/apache/nuttx/pull/8743#discussion_r1198462706
########## sched/semaphore/sem_holder.c: ########## @@ -145,19 +141,13 @@ nxsem_findholder(FAR sem_t *sem, FAR struct tcb_s *htcb) } } #else - int i; + /* We have one hard-allocated holder structures in sem_t */ - /* We have two hard-allocated holder structures in sem_t */ - - for (i = 0; i < 2; i++) + if (sem->holder.htcb == htcb) { - pholder = &sem->holder[i]; - if (pholder->htcb == htcb) - { - /* Got it! */ + /* Got it! */ - return pholder; - } + return pholder; Review Comment: Sorry for making a basic mistake, let me correct it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org