diff options
author | Gary E. Miller <gem@rellim.com> | 2015-02-02 16:19:00 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-02-02 16:19:00 -0800 |
commit | a7927e2470fcf1fc573888b1c09f9e11eed0f001 (patch) | |
tree | 5aff949f9b85e5a4ea37289f1c1a40ac3bfcc14f /libgps_json.c | |
parent | ed273157309b72fda95da43bd50a468bb23476f0 (diff) | |
download | gpsd-a7927e2470fcf1fc573888b1c09f9e11eed0f001.tar.gz |
Fix improper timespec type casting.
Diffstat (limited to 'libgps_json.c')
-rw-r--r-- | libgps_json.c | 8 |
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) |