Clear Location structure before convertion

Set all members of Location to zero by default
CRs-Fixed: 2087799

Change-Id: I01f7c96ff54a58f5f7ee812cd78b6fcccece4f02
This commit is contained in:
Baili Feng 2017-08-09 16:15:04 +08:00
parent 9ae216a6c0
commit e83b68d39b

View file

@ -123,6 +123,7 @@ GnssAdapter::convertLocation(Location& out, const LocGpsLocation& locGpsLocation
const GpsLocationExtended& locationExtended,
const LocPosTechMask techMask)
{
memset(&out, 0, sizeof(Location));
out.size = sizeof(Location);
if (LOC_GPS_LOCATION_HAS_LAT_LONG & locGpsLocation.flags) {
out.flags |= LOCATION_HAS_LAT_LONG_BIT;