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;
}
if (gga_res != -1) {
_uart[i]->write(gga);
_uart[i]->write(gga_end);
}
_uart[i]->write(gga);
_uart[i]->write(gga_end);
if (rmc_res != -1) {
_uart[i]->write(rmc);
_uart[i]->write(rmc_end);
}
_uart[i]->write(rmc);
_uart[i]->write(rmc_end);
}
if (gga_res != -1) {
free(gga);
}
if (rmc_res != -1) {
free(rmc);
}
free(gga);
free(rmc);
}
#endif // HAL_NMEA_OUTPUT_ENABLED