From 82df654227f83efab6610a896da96bc0008607f4 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 26 Oct 2013 13:33:55 -0400 Subject: Cleanup fixes. There was a typo in the last change to the Zodiac driver. All regression tests pass. --- driver_zodiac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'driver_zodiac.c') diff --git a/driver_zodiac.c b/driver_zodiac.c index a62a4a99..ec93c13d 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -18,6 +18,7 @@ #endif /* S_SPLINT_S */ #include "gpsd.h" +#include "bits.h" /* Zodiac protocol description uses 1-origin indexing by little-endian word */ #define get16z(buf, n) ( (buf[2*(n)-2]) \ @@ -52,11 +53,10 @@ static int end_write(int fd, void *d, int len) /* write an array of shorts in little-endian format */ { char buf[BUFSIZ]; - char *p = buf; short *data = (short *)d; size_t n = (size_t)(len/2); - for (n - 0; n < (size_t)(len/2); n++) + for (n = 0; n < (size_t)(len/2); n++) putle16(buf, n*2, data[n]); return write(fd, buf, len); } -- cgit v1.2.1