summaryrefslogtreecommitdiff
path: root/tsip.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-01-05 21:47:53 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-01-05 21:47:53 +0000
commitb733f7ba16cc88b9dca875998c57bbb09b113b22 (patch)
tree6ddae3b1683a3f4459f0d17ad702aea5a7ab96a7 /tsip.c
parentce47fae04c9742560ae5dedb92c485263dcb89f9 (diff)
downloadgpsd-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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tsip.c b/tsip.c
index 30ddfc3a..8d182261 100644
--- a/tsip.c
+++ b/tsip.c
@@ -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 @*/