libc/stdlib/nano-mallocr.c, typo in variable name

Nano malloc uses `size' in assertation whereas the correct variable would be
`s'.  Given this has existed ever since nano malloc support was added, based
on the context ("returned payload area of desired size does not exceed the
actual allocated chunk") I presume that indeed `s' (user input) and not
`r->size' (computed) shall be used.
This commit is contained in:
Pekka Seppänen 2023-08-28 14:02:20 +03:00 committed by Corinna Vinschen
parent ca2a4ec243
commit 31eb43efa7
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ void * nano_malloc(RARG malloc_size_t s)
*(long *)((char *)r + offset) = -offset;
}
assert(align_ptr + size <= (char *)r + alloc_size);
assert(align_ptr + s <= (char *)r + alloc_size);
return align_ptr;
}
#endif /* DEFINE_MALLOC */