diff --git a/include/semaphore.h b/include/semaphore.h index 6fee2477c4..0056909db6 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -108,7 +108,7 @@ typedef struct sem_s sem_t; {(c), 0, NULL} /* semcount, flags, hhead */ # else # define SEM_INITIALIZER(c) \ - {(c), 0, SEMHOLDER_INITIALIZER, SEMHOLDER_INITIALIZER} /* semcount, flags, holder[2] */ + {(c), 0, {SEMHOLDER_INITIALIZER, SEMHOLDER_INITIALIZER}} /* semcount, flags, holder[2] */ # endif #else # define SEM_INITIALIZER(c) \ diff --git a/sched/semaphore/sem_holder.c b/sched/semaphore/sem_holder.c index 113fee94ce..f14f9fe679 100644 --- a/sched/semaphore/sem_holder.c +++ b/sched/semaphore/sem_holder.c @@ -158,7 +158,7 @@ static FAR struct semholder_s *sem_findholder(sem_t *sem, for (i = 0; i < 2; i++) { - pholder = &sem->pholder[i]; + pholder = &sem->holder[i]; if (pholder->htcb == htcb) { /* Got it! */