diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-29 13:30:25 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-29 13:30:25 -0400 |
commit | a7c2f46d6d14f81cf379b6a77a4919ded0408a39 (patch) | |
tree | 4321242d66635581a117e8ca26f41235718fba95 /driver_zodiac.c | |
parent | 689e3c3f6c388709a560c1e42b3a04a18020a4fb (diff) | |
download | gpsd-a7c2f46d6d14f81cf379b6a77a4919ded0408a39.tar.gz |
splint cleanup. Regression tests pass and PPS live-tests correctly.
Diffstat (limited to 'driver_zodiac.c')
-rw-r--r-- | driver_zodiac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver_zodiac.c b/driver_zodiac.c index ec93c13d..296dbece 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -49,16 +49,16 @@ static unsigned short zodiac_checksum(unsigned short *w, int n) return -csum; } -static int end_write(int fd, void *d, int len) +static ssize_t end_write(int fd, void *d, size_t len) /* write an array of shorts in little-endian format */ { - char buf[BUFSIZ]; + unsigned char buf[BUFSIZ]; short *data = (short *)d; size_t n = (size_t)(len/2); for (n = 0; n < (size_t)(len/2); n++) putle16(buf, n*2, data[n]); - return write(fd, buf, len); + return write(fd, (char*)buf, len); } /* zodiac_spew - Takes a message type, an array of data words, and a length |