HAL_SITL: fixed a build warning

This commit is contained in:
Andrew Tridgell 2015-05-30 22:16:37 +10:00
parent 73445fdae9
commit 249b339e6c

View File

@ -71,7 +71,9 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
char *autotest_dir = NULL;
float speedup = 1.0f;
asprintf(&autotest_dir, SKETCHBOOK "/Tools/autotest");
if (asprintf(&autotest_dir, SKETCHBOOK "/Tools/autotest") <= 0) {
hal.scheduler->panic("out of memory");
}
signal(SIGFPE, _sig_fpe);
// No-op SIGPIPE handler