diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-01-05 21:47:53 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-01-05 21:47:53 +0000 |
commit | b733f7ba16cc88b9dca875998c57bbb09b113b22 (patch) | |
tree | 6ddae3b1683a3f4459f0d17ad702aea5a7ab96a7 /tsip.c | |
parent | ce47fae04c9742560ae5dedb92c485263dcb89f9 (diff) | |
download | gpsd-b733f7ba16cc88b9dca875998c57bbb09b113b22.tar.gz |
This diff goes most of the way to getting us splint-clean again.
Diffstat (limited to 'tsip.c')
-rw-r--r-- | tsip.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -19,7 +19,7 @@ #ifdef TSIP_ENABLE #define TSIP_CHANNELS 12 -static int tsip_write(int fd, unsigned int id, unsigned char *buf, size_t len) +static int tsip_write(int fd, unsigned int id, /*@null@*/unsigned char *buf, size_t len) { #ifdef ALLOW_RECONFIGURE char buf2[BUFSIZ]; @@ -33,6 +33,7 @@ static int tsip_write(int fd, unsigned int id, unsigned char *buf, size_t len) if (write(fd,buf2,2) != 2) return -1; + /*@ -nullderef @*/ while (len-- > 0) { if (*buf == '\x10') if (write(fd,buf2,1) != 1) @@ -41,6 +42,7 @@ static int tsip_write(int fd, unsigned int id, unsigned char *buf, size_t len) if (write(fd,buf++,1) != 1) return -1; } + /*@ +nullderef @*/ buf2[1] = '\x03'; /*@ -charint @*/ |