mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL_SITL: check return value from posix_memalign
Avoids return-value-must-be-checked compiler warning
This commit is contained in:
parent
f06b27e4a3
commit
d6fe9d47e0
@ -267,7 +267,9 @@ bool Scheduler::thread_create(AP_HAL::MemberProc proc, const char *name, uint32_
|
||||
if (!a->f) {
|
||||
goto failed;
|
||||
}
|
||||
posix_memalign(&a->stack, 4096, alloc_stack);
|
||||
if (posix_memalign(&a->stack, 4096, alloc_stack) != 0) {
|
||||
goto failed;
|
||||
}
|
||||
if (!a->stack) {
|
||||
goto failed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user