diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-04-30 23:04:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-04-30 23:05:37 -0400 |
commit | 321c7710c3f3a17d56e9e5eede9aebadbaf16e3e (patch) | |
tree | fae8712111ede1cd948e8846a3bbdafeb8dfd45a /gpsd.c | |
parent | 5aa7ce8d00de15c832ab90113ef5b08221746e7f (diff) | |
download | gpsd-321c7710c3f3a17d56e9e5eede9aebadbaf16e3e.tar.gz |
Fix static-checker warnings. All regression tests pass.
cppchecker now finds variables that could have reduced scope;
that's most of these.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2273,7 +2273,6 @@ int main(int argc, char *argv[]) for (i = 0; i < AFCOUNT; i++) { if (msocks[i] >= 0 && FD_ISSET(msocks[i], &rfds)) { socklen_t alen = (socklen_t) sizeof(fsin); - char *c_ip; /*@+matchanyintegral@*/ socket_t ssock = accept(msocks[i], (struct sockaddr *)&fsin, &alen); @@ -2285,6 +2284,7 @@ int main(int argc, char *argv[]) struct subscriber_t *client = NULL; int opts = fcntl(ssock, F_GETFL); static struct linger linger = { 1, RELEASE_TIMEOUT }; + char *c_ip; if (opts >= 0) (void)fcntl(ssock, F_SETFL, opts | O_NONBLOCK); |