summaryrefslogtreecommitdiff
path: root/ntpshm.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nsn.com>2015-02-16 01:30:08 +0100
committerEric S. Raymond <esr@thyrsus.com>2015-02-15 22:04:33 -0500
commit49fe1997713deac3440fbb2c960305762eb500f6 (patch)
treef78e265809be7e52b6f82893e830c76af46700f8 /ntpshm.c
parent68eaa6fc71f4d03b8d6fc3361569ba0906ee394d (diff)
downloadgpsd-49fe1997713deac3440fbb2c960305762eb500f6.tar.gz
Remove unused and incorrect retval from timespec_str
All callers ignore value returned by timespec_str. Additionally, the function returns simply the result of snprintf(), which is not necessarily the number of chars written to the buffer (if the buffer provided by the caller was too small).
Diffstat (limited to 'ntpshm.c')
-rw-r--r--ntpshm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ntpshm.c b/ntpshm.c
index e5a6b3c2..25155b7a 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -295,8 +295,8 @@ int ntpshm_put(struct gps_device_t *session, volatile struct shmTime *shmseg, st
shmTime->valid = 1;
/*@-type@*/ /* splint is confused about struct timespec */
- (void)timespec_str( &td->real, real_str, sizeof(real_str) );
- (void)timespec_str( &td->clock, clock_str, sizeof(clock_str) );
+ timespec_str( &td->real, real_str, sizeof(real_str) );
+ timespec_str( &td->clock, clock_str, sizeof(clock_str) );
gpsd_report(&session->context->errout, LOG_RAW,
"NTP ntpshm_put(%s %s) %s @ %s\n",
session->gpsdata.dev.path,
@@ -380,8 +380,8 @@ static void chrony_send(struct gps_device_t *session, struct timedrift_t *td)
/*@+type@*/
/*@-type@*/ /* splint is confused about struct timespec */
- (void)timespec_str( &td->real, real_str, sizeof(real_str) );
- (void)timespec_str( &td->clock, clock_str, sizeof(clock_str) );
+ timespec_str( &td->real, real_str, sizeof(real_str) );
+ timespec_str( &td->clock, clock_str, sizeof(clock_str) );
gpsd_report(&session->context->errout, LOG_RAW,
"PPS chrony_send %s @ %s Offset: %0.9f\n",
real_str, clock_str, sample.offset);