summaryrefslogtreecommitdiff
path: root/libgps_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-23 13:38:38 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-23 13:38:38 -0500
commit0747ffe258042efe53c10964c579af62c7b8ae30 (patch)
tree00b87b474ef0f02c1c6d0265e8faec21d5b0359a /libgps_json.c
parentf26a4032b74a018031563903ec1c1fe26efc493c (diff)
downloadgpsd-0747ffe258042efe53c10964c579af62c7b8ae30.tar.gz
Abolish all confusing uses of the word 'drift' for a time delta.
No logic changes. All regression tesrs pass. Live PPS observed.
Diffstat (limited to 'libgps_json.c')
-rw-r--r--libgps_json.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgps_json.c b/libgps_json.c
index 156ddf1b..c9a35363 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -370,7 +370,7 @@ int json_pps_read(const char *buf, struct gps_data_t *gpsdata,
/*@ +fullinitblock @*/
int status;
- memset(&gpsdata->timedrift, '\0', sizeof(gpsdata->timedrift));
+ memset(&gpsdata->pps, '\0', sizeof(gpsdata->pps));
status = json_read_object(buf, json_attrs_pps, endptr);
/*
* This is theoretically dodgy, but in practice likely not
@@ -378,10 +378,10 @@ int json_pps_read(const char *buf, struct gps_data_t *gpsdata,
*/
/*@-usedef@*/
/*@-type@*//* splint is confused about struct timespec */
- gpsdata->timedrift.real.tv_sec = (time_t)real_sec;
- gpsdata->timedrift.real.tv_nsec = (long)real_nsec;
- gpsdata->timedrift.clock.tv_sec = (time_t)clock_sec;
- gpsdata->timedrift.clock.tv_nsec = (long)clock_nsec;
+ gpsdata->pps.real.tv_sec = (time_t)real_sec;
+ gpsdata->pps.real.tv_nsec = (long)real_nsec;
+ gpsdata->pps.clock.tv_sec = (time_t)clock_sec;
+ gpsdata->pps.clock.tv_nsec = (long)clock_nsec;
/*@+type@*/
/*@+usedef@*/
if (status != 0)
@@ -521,7 +521,7 @@ int libgps_json_unpack(const char *buf,
status = json_pps_read(buf, gpsdata, end);
if (status == 0) {
gpsdata->set &= ~UNION_SET;
- gpsdata->set |= PPSDRIFT_SET;
+ gpsdata->set |= PPS_SET;
}
return status;
} else