summaryrefslogtreecommitdiff
path: root/libgps_sock.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-21 12:56:08 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-21 12:56:08 -0500
commita61e28529df634963c0967e59aae673f8fc7741e (patch)
tree2c8e5c9ed1ff63870f8a94bd33ecd08a9825caa7 /libgps_sock.c
parentf351f5981604338db80e2b2864b7dcb818e7fc61 (diff)
downloadgpsd-a61e28529df634963c0967e59aae673f8fc7741e.tar.gz
Easy splint cleanups. All regression tests pass.
Diffstat (limited to 'libgps_sock.c')
-rw-r--r--libgps_sock.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgps_sock.c b/libgps_sock.c
index 8d3a8742..e5135638 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -273,7 +273,7 @@ int gps_unpack(char *buf, struct gps_data_t *gpsdata)
#endif /* __UNUSED__ */
for (ns = buf; ns; ns = strstr(ns + 1, "GPSD")) {
- if (str_starts_with(ns, "GPSD")) {
+ /*@i1@*/if (str_starts_with(ns, "GPSD")) {
/* the following should execute each time we have a good next sp */
for (sp = ns + 5; *sp != '\0'; sp = tp + 1) {
bool eol;
@@ -425,11 +425,11 @@ int gps_unpack(char *buf, struct gps_data_t *gpsdata)
// cppcheck-suppress invalidscanf
(void)sscanf(sp, "%d %d %d %lf %d", &i1,
&i2, &i3, &f4, &i5);
- gpsdata->skyview[j].PRN = i1;
- gpsdata->skyview[j].elevation = i2;
- gpsdata->skyview[j].azimuth = i3;
- gpsdata->skyview[j].ss = f4;
- gpsdata->skyview[j].used = i5;
+ gpsdata->skyview[j].PRN = (short)i1;
+ gpsdata->skyview[j].elevation = (short)i2;
+ gpsdata->skyview[j].azimuth = (short)i3;
+ gpsdata->skyview[j].ss = (double)f4;
+ gpsdata->skyview[j].used = (bool)i5;
if (i5 == 1)
gpsdata->satellites_used++;
}