summaryrefslogtreecommitdiff
path: root/libgps.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-10 09:05:32 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-10 09:05:32 +0000
commitb85ca4e26b61471cd17e9468efbb49c56b77fdb9 (patch)
tree51fe0e01ae5665a98f4b28fda241ee244ca80e8e /libgps.c
parentdad8b2b68113840c826e43e3857c487498271c85 (diff)
downloadgpsd-b85ca4e26b61471cd17e9468efbb49c56b77fdb9.tar.gz
Son of the Splint Cleanup.
Major change in this set is enforcong consistency about the data type of serial parity information.
Diffstat (limited to 'libgps.c')
-rw-r--r--libgps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgps.c b/libgps.c
index e1b96bf4..8ec4d4cc 100644
--- a/libgps.c
+++ b/libgps.c
@@ -134,7 +134,7 @@ int gps_unpack(char *buf, struct gps_data_t *gpsdata)
if (sp[2] == '?') {
gpsdata->dev.baudrate = gpsdata->dev.stopbits = 0;
} else
- (void)sscanf(sp, "B=%d %*d %*s %d",
+ (void)sscanf(sp, "B=%u %*d %*s %u",
&gpsdata->dev.baudrate, &gpsdata->dev.stopbits);
break;
case 'C':
@@ -374,7 +374,8 @@ int gps_unpack(char *buf, struct gps_data_t *gpsdata)
gpsdata->set |= TIME_SET;
}
for (j = 0; j < gpsdata->satellites; j++) {
- PRN[j]=elevation[j]=azimuth[j]=ss[j]=used[j]=0;
+ PRN[j]=elevation[j]=azimuth[j]=used[j]=0;
+ ss[j]=0.0;
}
for (j = 0, gpsdata->satellites_used = 0; j < gpsdata->satellites; j++) {
if ((sp != NULL) && ((sp = strchr(sp, ':')) != NULL)) {