summaryrefslogtreecommitdiff
path: root/gpsctl.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-01-21 05:37:17 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-01-21 05:37:17 +0000
commit0e196da03e375aeb4a71611f65c33e0bfbbe22ac (patch)
tree5e164db97c9fb62feff5f526f9efaef33bf4c908 /gpsctl.c
parent32e63204b508642b48b7c680c48cfc256cb3ae8e (diff)
downloadgpsd-0e196da03e375aeb4a71611f65c33e0bfbbe22ac.tar.gz
Fix some "What was I thinking?" code.
Diffstat (limited to 'gpsctl.c')
-rw-r--r--gpsctl.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/gpsctl.c b/gpsctl.c
index 8f4e1df8..7e86fffa 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -450,20 +450,10 @@ int main(int argc, char **argv)
session.device_type->type_name);
status = 1;
} else {
- bool err = false;
-
- if (!err) {
- if (session.device_type->control_send == NULL) {
- (void)fprintf(stderr, "gpsctl: %s has no control-send mrthod.\n",
- session.device_type->type_name);
- status = 1;
- } else {
- if (session.device_type->control_send(&session,
- cooked, cookend-cooked) == -1) {
- (void)fprintf(stderr, "gpsctl: control transmission failed.\n");
- status = 1;
- }
- }
+ if (session.device_type->control_send(&session,
+ cooked, cookend-cooked) == -1) {
+ (void)fprintf(stderr, "gpsctl: control transmission failed.\n");
+ status = 1;
}
}
}