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



##########
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:
       Reworked, thanks!




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to