Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libc/minimal: small fixes to malloc() and friends
When malloc() is called with a size of 0 we should not set errno to ENOMEM as there is no actual allocation failure in that case. This duplicates the realloc() behavior. Check the return value of sys_mutex_lock() in the free() case to make Coverity happy. Replace all CHECKIF() by explicit assertion statements to uniformize those checks with the free() case which can't return errors. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
- Loading branch information