tests: mem_alloc: Fix build issue with malloc test
Since malloc takes a size_t, we should use 0x7fffffff as the max size (ie what the larget unsigned int) would normall be. Newer newlib's have a check that will fail building since 0xf0000000 exceeds the size. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
f0a20c62ac
commit
64be8d3283
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ void test_memalloc_max(void)
|
|||
{
|
||||
char *ptr = NULL;
|
||||
|
||||
ptr = malloc(0xF0000000);
|
||||
ptr = malloc(0x7fffffff);
|
||||
zassert_is_null(ptr, "malloc passed unexpectedly");
|
||||
free(ptr);
|
||||
ptr = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue