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 2017/12/18 08:23:09 UTC

[GitHub] rymanluk closed pull request #700: kernel/os_mempool: Fix for incorrect check on os_mempool_init

rymanluk closed pull request #700: kernel/os_mempool: Fix for incorrect check on os_mempool_init
URL: https://github.com/apache/mynewt-core/pull/700
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/kernel/os/src/os_mempool.c b/kernel/os/src/os_mempool.c
index 65e4f6159..6ce3770c6 100644
--- a/kernel/os/src/os_mempool.c
+++ b/kernel/os/src/os_mempool.c
@@ -90,7 +90,7 @@ os_mempool_init(struct os_mempool *mp, int blocks, int block_size,
     struct os_memblock *block_ptr;
 
     /* Check for valid parameters */
-    if (!mp || (blocks < 0) || (block_size <= sizeof(struct os_memblock))) {
+    if (!mp || (blocks < 0) || (block_size <= 0)) {
         return OS_INVALID_PARM;
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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