summaryrefslogtreecommitdiff
path: root/nuttx/mm/mm_heap/mm_realloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/mm/mm_heap/mm_realloc.c')
-rw-r--r--nuttx/mm/mm_heap/mm_realloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/mm/mm_heap/mm_realloc.c b/nuttx/mm/mm_heap/mm_realloc.c
index f41d019b5..5778975f5 100644
--- a/nuttx/mm/mm_heap/mm_realloc.c
+++ b/nuttx/mm/mm_heap/mm_realloc.c
@@ -101,7 +101,7 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem,
/* If size is zero, then realloc is equivalent to free */
- if (size <= 0)
+ if (size < 1)
{
mm_free(heap, oldmem);
return NULL;
@@ -170,7 +170,7 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem,
* previous chunk is smaller than the next chunk.
*/
- if (prevsize > 0 && (nextsize >= prevsize || nextsize <= 0))
+ if (prevsize > 0 && (nextsize >= prevsize || nextsize < 1))
{
/* Can we get everything we need from the previous chunk? */