You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2019/02/26 14:13:15 UTC
[mynewt-core] branch master updated: kernel/os: Fix redundant
checks in os_mempool_init
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 8594e4f kernel/os: Fix redundant checks in os_mempool_init
8594e4f is described below
commit 8594e4f78837b0b5008d1907d2018a42cb47fc8e
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Tue Feb 26 14:37:09 2019 +0100
kernel/os: Fix redundant checks in os_mempool_init
Unsigned arguments cannot be <0...
---
kernel/os/src/os_mempool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/os/src/os_mempool.c b/kernel/os/src/os_mempool.c
index 26172d3..53002ea 100644
--- a/kernel/os/src/os_mempool.c
+++ b/kernel/os/src/os_mempool.c
@@ -125,7 +125,7 @@ os_mempool_init_internal(struct os_mempool *mp, uint16_t blocks,
struct os_memblock *block_ptr;
/* Check for valid parameters */
- if (!mp || (blocks < 0) || (block_size <= 0)) {
+ if (!mp || (block_size == 0)) {
return OS_INVALID_PARM;
}