You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/06/25 15:08:41 UTC

[GitHub] [mynewt-core] andrzej-kaczmarek commented on a change in pull request #1897: os_sem: Preventing token overflow.

andrzej-kaczmarek commented on a change in pull request #1897: os_sem: Preventing token overflow.
URL: https://github.com/apache/mynewt-core/pull/1897#discussion_r297240099
 
 

 ##########
 File path: kernel/os/src/os_sem.c
 ##########
 @@ -42,6 +42,7 @@ os_sem_init(struct os_sem *sem, uint16_t tokens)
         goto done;
     }
 
+    sem->max_tokens = tokens;
 
 Review comment:
   `tokens` parameter is an initial value, not a max value
   we can only check for an integer overflow on `sem_tokens`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services