summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-24 11:27:11 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-24 11:27:11 -0400
commit4bf5e0bd3a766511cf273ffd7162af9f2f8e64fb (patch)
tree2290ffa965632d6a0ce304f7ffe95d68d93ae1ff /gpsctl.c
parent218fe292eb7f71239a035e6d99f7c2d5339d96df (diff)
downloadgpsd-4bf5e0bd3a766511cf273ffd7162af9f2f8e64fb.tar.gz
Properly free devices when select() sees bad fds for them.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/gpsctl.c b/gpsctl.c
index b3c11421..49037bed 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -665,19 +665,15 @@ int main(int argc, char **argv)
/* grab packets until we time out, get sync, or fail sync */
for (hunting = true; hunting; )
{
-#ifdef EFDS
fd_set efds;
-#endif /* EFDS */
switch(gpsd_await_data(&rfds, maxfd, &all_fds, context.debug))
{
case AWAIT_GOT_INPUT:
break;
case AWAIT_NOT_READY:
-#ifdef EFDS
/* no recovery from bad fd is possible */
if (FD_ISSET(session.gpsdata.gps_fd, &efds))
exit(EXIT_FAILURE);
-#endif /* EFDS */
continue;
case AWAIT_FAILED:
exit(EXIT_FAILURE);