summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-30 02:02:56 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-30 02:02:56 +0000
commit2190780c32f11b769f24d27725a9002207ea4af9 (patch)
treec0293a3f55e33a68d4971f4c2788cdb6b96a7a3a /gpsd.c
parent1eaa0e110e309e916b900de264d4fefe3ccd19ba (diff)
downloadgpsd-2190780c32f11b769f24d27725a9002207ea4af9.tar.gz
Create a way not to step on defaults.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpsd.c b/gpsd.c
index f2d0640a..393d6ca8 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2045,9 +2045,6 @@ int main(int argc, char *argv[])
if (FD_ISSET(msock, &rfds)) {
socklen_t alen = (socklen_t)sizeof(fsin);
char *c_ip;
-#ifdef GPSDNG_ENABLE
- char announce[GPS_JSON_RESPONSE_MAX];
-#endif /* GPSDNG_ENABLE */
/*@i1@*/int ssock = accept(msock, (struct sockaddr *) &fsin, &alen);
if (ssock == -1)
@@ -2066,6 +2063,9 @@ int main(int argc, char *argv[])
"no subscriber slots available\n", c_ip, ssock);
(void)close(ssock);
} else {
+#ifdef GPSDNG_ENABLE
+ char announce[GPS_JSON_RESPONSE_MAX];
+#endif /* GPSDNG_ENABLE */
FD_SET(ssock, &all_fds);
adjust_max_fd(ssock, true);
client->fd = ssock;