diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-09 18:13:24 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-09 18:13:24 -0500 |
commit | 2c9e5b2eb52fb2d6eee3f8fc50ee916e68ee017a (patch) | |
tree | 319097a2c8197088687bd9a8000863c20b011239 /gpsutils.c | |
parent | 5242310d708875cba0d3042917a0c68ee6d267e7 (diff) | |
download | gpsd-2c9e5b2eb52fb2d6eee3f8fc50ee916e68ee017a.tar.gz |
splint cleanup. All regressiion tests pass.
Diffstat (limited to 'gpsutils.c')
-rw-r--r-- | gpsutils.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |