libc: newlib: libc-hooks: Fix Coverity warning
Suppress the coverity warning on using the semaphore as this semaphore is used and freed only in this function. Fixes: #18960 Signed-off-by: David Leach <david.leach@nxp.com>
This commit is contained in:
parent
469f53c210
commit
2abdc19ceb
|
@ -238,6 +238,7 @@ void *_sbrk(int count)
|
|||
{
|
||||
void *ret, *ptr;
|
||||
|
||||
/* coverity[CHECKED_RETURN] */
|
||||
sys_sem_take(&heap_sem, K_FOREVER);
|
||||
|
||||
#if CONFIG_NEWLIB_LIBC_ALIGNED_HEAP_SIZE
|
||||
|
@ -253,6 +254,7 @@ void *_sbrk(int count)
|
|||
ret = (void *)-1;
|
||||
}
|
||||
|
||||
/* coverity[CHECKED_RETURN] */
|
||||
sys_sem_give(&heap_sem);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue