Copter: CTUN logging checks return value of height_above_terrain

This resolves a Covarity warning but it was actually safe before
No functional change
This commit is contained in:
Randy Mackay 2016-08-08 12:30:55 +09:00
parent 542677f1d5
commit 575795fa84

View File

@ -319,7 +319,9 @@ void Copter::Log_Write_Control_Tuning()
// get terrain altitude
float terr_alt = 0.0f;
#if AP_TERRAIN_AVAILABLE && AC_TERRAIN
terrain.height_above_terrain(terr_alt, true);
if (terrain.height_above_terrain(terr_alt, true)) {
terr_alt = 0.0f;
}
#endif
struct log_Control_Tuning pkt = {