summaryrefslogtreecommitdiff
path: root/gpsutils.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-09 18:13:24 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-09 18:13:24 -0500
commit2c9e5b2eb52fb2d6eee3f8fc50ee916e68ee017a (patch)
tree319097a2c8197088687bd9a8000863c20b011239 /gpsutils.c
parent5242310d708875cba0d3042917a0c68ee6d267e7 (diff)
downloadgpsd-2c9e5b2eb52fb2d6eee3f8fc50ee916e68ee017a.tar.gz
splint cleanup. All regressiion tests pass.
Diffstat (limited to 'gpsutils.c')
-rw-r--r--gpsutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gpsutils.c b/gpsutils.c
index 388a7bae..8c9525ff 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -490,11 +490,12 @@ double earth_distance(double lat1, double lon1, double lat2, double lon2)
* return negative for error
* otherwise the number of chars in buf, excluding trailing \0
*/
-int timespec_str( struct timespec *ts, char *buf, int buf_size )
+int timespec_str(struct timespec *ts, /*@out@*/char *buf, int buf_size)
{
int ret;
char sign = ' ';
+ /*@-type@*//* splint is confused about timespec*/
if ( (0 > ts->tv_nsec ) || ( 0 > ts->tv_sec ) ) {
sign = '-';
}
@@ -502,5 +503,6 @@ int timespec_str( struct timespec *ts, char *buf, int buf_size )
sign,
(long)labs(ts->tv_sec),
(long)labs(ts->tv_nsec));
+ /*@+type@*/
return ret;
}