GPS LOCK did not work when NMEA_PROVIDER follows it

there is an implicit requirement on the loc_gps_cfg_s_type field
data type, that is they must be 32 bit fields. Otherwise it would
only work with the assistance of padding. When two adjacent 8 bit
fields are defined, the later filled field would overwrite the
previously written neighbor. This is why GPS_LOCK was tested as
broken in the latest build.

This also fixes a theoretic bug that when there are two of the
same fields defined in the config table to be filled, the
accounting of the filled entries was incorrect earlier. This is
not a realistic bug, as there are no idential entries in the
config table HAL fills.

Bug: 16131208

Change-Id: I2e262fb30272f6f334508df17bb640022d7b1ef5
2 files changed