summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-02-22 16:51:17 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-22 16:51:17 -0500
commit901b0b5d7ee86d11134e4a0b90a24387741b8f98 (patch)
treebfac9a762b0656cb35a86ec56435c868b3afdfe1 /gpsmon.c
parentd11e1c8bf978eb4b379d6013a233ab2a2cd6d5cf (diff)
downloadgpsd-901b0b5d7ee86d11134e4a0b90a24387741b8f98.tar.gz
Splint cleanup.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 96cac301..c3ebef33 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -765,7 +765,7 @@ int main(int argc, char **argv)
double rate = strtod(arg, NULL);
const struct monitor_object_t **switcher = active;
- if ((*fallback)->driver->rate_switcher)
+ if (fallback != NULL && (*fallback)->driver->rate_switcher != NULL)
switcher = fallback;
/* Ugh...should have a controlfd slot
* in the session structure, really
@@ -843,7 +843,7 @@ int main(int argc, char **argv)
else if (serial) {
const struct monitor_object_t **switcher = active;
- if ((*fallback)->driver->mode_switcher)
+ if (fallback != NULL && (*fallback)->driver->mode_switcher != NULL)
switcher = fallback;
/* Ugh...should have a controlfd slot
* in the session structure, really
@@ -893,7 +893,7 @@ int main(int argc, char **argv)
char *modespec;
const struct monitor_object_t **switcher = active;
- if ((*fallback)->driver->speed_switcher)
+ if (fallback != NULL && (*fallback)->driver->speed_switcher != NULL)
switcher = fallback;
modespec = strchr(arg, ':');