summaryrefslogtreecommitdiff
path: root/libgps_json.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-02-02 16:19:00 -0800
committerGary E. Miller <gem@rellim.com>2015-02-02 16:19:00 -0800
commita7927e2470fcf1fc573888b1c09f9e11eed0f001 (patch)
tree5aff949f9b85e5a4ea37289f1c1a40ac3bfcc14f /libgps_json.c
parented273157309b72fda95da43bd50a468bb23476f0 (diff)
downloadgpsd-a7927e2470fcf1fc573888b1c09f9e11eed0f001.tar.gz
Fix improper timespec type casting.
Diffstat (limited to 'libgps_json.c')
-rw-r--r--libgps_json.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgps_json.c b/libgps_json.c
index 36ab0035..f58de8be 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -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 = (long)real_sec;
- gpsdata->timedrift.real.tv_nsec = (time_t)real_nsec;
- gpsdata->timedrift.clock.tv_sec = (long)clock_sec;
- gpsdata->timedrift.clock.tv_nsec = (time_t)clock_nsec;
+ 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;
/*@+type@*/
/*@+usedef@*/
if (status != 0)