diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index f6643b1896..92f8e2ba85 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -545,12 +545,12 @@ bool AP_Arming::gps_checks(bool report) if ((checks_to_perform & ARMING_CHECK_ALL) || (checks_to_perform & ARMING_CHECK_GPS)) { // Any failure messages from GPS backends - char failure_msg[50] = {}; - if (!AP::gps().backends_healthy(failure_msg, ARRAY_SIZE(failure_msg))) { - if (failure_msg[0] != '\0') { - check_failed(ARMING_CHECK_GPS, report, "%s", failure_msg); - } - return false; + char failure_msg[50] = {}; + if (!AP::gps().backends_healthy(failure_msg, ARRAY_SIZE(failure_msg))) { + if (failure_msg[0] != '\0') { + check_failed(ARMING_CHECK_GPS, report, "%s", failure_msg); + } + return false; } for (uint8_t i = 0; i < gps.num_sensors(); i++) {