pkarashchenko commented on a change in pull request #5171:
URL: https://github.com/apache/incubator-nuttx/pull/5171#discussion_r780675912



##########
File path: libs/libc/semaphore/sem_init.c
##########
@@ -78,10 +78,8 @@ int nxsem_init(FAR sem_t *sem, int pshared, unsigned int 
value)
 #  if CONFIG_SEM_PREALLOCHOLDERS > 0
       sem->hhead            = NULL;
 #  else
-      sem->holder[0].htcb   = NULL;
-      sem->holder[0].counts = 0;
-      sem->holder[1].htcb   = NULL;
-      sem->holder[1].counts = 0;
+      sem->holder[0]        = (struct semholder_s) SEMHOLDER_INITIALIZER;
+      sem->holder[1]        = (struct semholder_s) SEMHOLDER_INITIALIZER;

Review comment:
       I'm not sure if this is allowed with C89. Please check and if it is not 
supported, then we need to rework this part.




-- 
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


Reply via email to