summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2004-09-28 22:48:03 +0000
committerEric S. Raymond <esr@thyrsus.com>2004-09-28 22:48:03 +0000
commitdf688288ed2008ae48881111a3129ce90dd5e66d (patch)
tree077ebdb19b1f526b5b89c846de3b0b9f1f5b8363 /gpsd.c
parent34c5be6a52a89860443db4b085f686539430ba22 (diff)
downloadgpsd-df688288ed2008ae48881111a3129ce90dd5e66d.tar.gz
Clean code up so it compiles with non-NMEA drivers disabled.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index 6b3d086a..9509fec4 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -534,7 +534,7 @@ int main(int argc, char *argv[])
int alen;
extern char *optarg;
int option, gpsd_speed = 0;
- char gpstype = 'n', *colon;
+ char gpstype = 'n';
int fd;
int need_gps;
int nowait = 0;
@@ -565,6 +565,8 @@ int main(int argc, char *argv[])
break;
#if TRIPMATE_ENABLE
case 'i':
+ {
+ char *colon;
if (!(colon = strchr(optarg, ':')) || colon == optarg)
fprintf(stderr,
"gpsd: required format is latitude:longitude.\n");
@@ -584,6 +586,7 @@ int main(int argc, char *argv[])
session->initpos.longitude[strlen(session->initpos.longitude)-1] = '\0';
}
break;
+ }
#endif /* TRIPMATE_ENABLE */
case 'n':
nowait = 1;