Browse Source

AP_GPS_MAV: initialise location while handling_msg

This reduces a covarity warning but it likely not really an issue because we always initialise newly allocated memory to zero anyway
master
Randy Mackay 9 years ago
parent
commit
38b3d3ff3a
  1. 2
      libraries/AP_GPS/AP_GPS_MAV.cpp

2
libraries/AP_GPS/AP_GPS_MAV.cpp

@ -59,7 +59,7 @@ void AP_GPS_MAV::handle_msg(mavlink_message_t *msg) @@ -59,7 +59,7 @@ void AP_GPS_MAV::handle_msg(mavlink_message_t *msg)
state.time_week_ms = packet.time_week_ms;
state.status = (AP_GPS::GPS_Status)packet.fix_type;
Location loc;
Location loc = {};
loc.lat = packet.lat;
loc.lng = packet.lon;
if (have_alt) {

Loading…
Cancel
Save