AP_NMEA_Output: remove pointless use of intermediate res variables

This commit is contained in:
Peter Barker 2021-12-07 13:15:36 +11:00 committed by Peter Barker
parent 8c7414e932
commit 939407a26f

View File

@ -167,24 +167,15 @@ void AP_NMEA_Output::update()
continue; continue;
} }
if (gga_res != -1) { _uart[i]->write(gga);
_uart[i]->write(gga); _uart[i]->write(gga_end);
_uart[i]->write(gga_end);
}
if (rmc_res != -1) { _uart[i]->write(rmc);
_uart[i]->write(rmc); _uart[i]->write(rmc_end);
_uart[i]->write(rmc_end);
}
} }
if (gga_res != -1) { free(gga);
free(gga); free(rmc);
}
if (rmc_res != -1) {
free(rmc);
}
} }
#endif // HAL_NMEA_OUTPUT_ENABLED #endif // HAL_NMEA_OUTPUT_ENABLED