summaryrefslogtreecommitdiff
path: root/driver_tsip.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-05-16 20:42:26 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-05-16 20:42:26 -0400
commitddc22ff56acef0690abfd22ee640cda4eb143933 (patch)
treebcbccbbab554a3e2915abfad9b5fe91a6604ff08 /driver_tsip.c
parent61ab6a6636762115689a190b4a9fe3386008d24c (diff)
downloadgpsd-ddc22ff56acef0690abfd22ee640cda4eb143933.tar.gz
Cleanup motivated by new cppcheck with more tests. All regression tests pass.
Diffstat (limited to 'driver_tsip.c')
-rw-r--r--driver_tsip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver_tsip.c b/driver_tsip.c
index b641a1f5..74d795f5 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -67,7 +67,6 @@ static int tsip_write(struct gps_device_t *session,
static bool tsip_detect(struct gps_device_t *session)
{
char buf[BUFSIZ];
- unsigned int n;
bool ret = false;
int myfd;
fd_set fdset;
@@ -90,6 +89,7 @@ static bool tsip_detect(struct gps_device_t *session)
/*@+ignoresigns@*/
myfd = session->gpsdata.gps_fd;
if (write(myfd, buf, 4) == 4) {
+ unsigned int n;
for (n = 0; n < 3; n++) {
FD_ZERO(&fdset);
FD_SET(myfd, &fdset);