diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp index 6f725b247e..b6265ffc06 100644 --- a/src/modules/fw_att_control/fw_att_control_main.cpp +++ b/src/modules/fw_att_control/fw_att_control_main.cpp @@ -667,8 +667,9 @@ FixedwingAttitudeControl::task_main() int pret = poll(&fds[0], (sizeof(fds) / sizeof(fds[0])), 100); /* timed out - periodic check for _task_should_exit, etc. */ - if (pret == 0) + if (pret == 0) { continue; + } /* this is undesirable but not much we can do - might want to flag unhappy status */ if (pret < 0) { @@ -1167,15 +1168,17 @@ int fw_att_control_main(int argc, char *argv[]) if (!strcmp(argv[1], "start")) { - if (att_control::g_control != nullptr) + if (att_control::g_control != nullptr) { warnx("already running"); return 1; + } att_control::g_control = new FixedwingAttitudeControl; - if (att_control::g_control == nullptr) + if (att_control::g_control == nullptr) { warnx("alloc failed"); return 1; + } if (OK != att_control::g_control->start()) { delete att_control::g_control;