aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/ardrone_interface/ardrone_interface.c3
-rw-r--r--src/drivers/hott/hott_sensors/hott_sensors.cpp2
-rw-r--r--src/drivers/hott/hott_telemetry/hott_telemetry.cpp2
-rw-r--r--src/drivers/md25/md25_main.cpp3
-rw-r--r--src/drivers/roboclaw/roboclaw_main.cpp3
5 files changed, 8 insertions, 5 deletions
diff --git a/src/drivers/ardrone_interface/ardrone_interface.c b/src/drivers/ardrone_interface/ardrone_interface.c
index 7d4b7d880..53d98ba9a 100644
--- a/src/drivers/ardrone_interface/ardrone_interface.c
+++ b/src/drivers/ardrone_interface/ardrone_interface.c
@@ -108,8 +108,9 @@ usage(const char *reason)
*/
int ardrone_interface_main(int argc, char *argv[])
{
- if (argc < 1)
+ if (argc < 2) {
usage("missing command");
+ }
if (!strcmp(argv[1], "start")) {
diff --git a/src/drivers/hott/hott_sensors/hott_sensors.cpp b/src/drivers/hott/hott_sensors/hott_sensors.cpp
index 1aade450b..4ac7e4bdf 100644
--- a/src/drivers/hott/hott_sensors/hott_sensors.cpp
+++ b/src/drivers/hott/hott_sensors/hott_sensors.cpp
@@ -197,7 +197,7 @@ hott_sensors_thread_main(int argc, char *argv[])
int
hott_sensors_main(int argc, char *argv[])
{
- if (argc < 1) {
+ if (argc < 2) {
errx(1, "missing command\n%s", commandline_usage);
}
diff --git a/src/drivers/hott/hott_telemetry/hott_telemetry.cpp b/src/drivers/hott/hott_telemetry/hott_telemetry.cpp
index 17a24d104..43df0cb8c 100644
--- a/src/drivers/hott/hott_telemetry/hott_telemetry.cpp
+++ b/src/drivers/hott/hott_telemetry/hott_telemetry.cpp
@@ -223,7 +223,7 @@ hott_telemetry_thread_main(int argc, char *argv[])
int
hott_telemetry_main(int argc, char *argv[])
{
- if (argc < 1) {
+ if (argc < 2) {
errx(1, "missing command\n%s", commandline_usage);
}
diff --git a/src/drivers/md25/md25_main.cpp b/src/drivers/md25/md25_main.cpp
index 7e5904d05..d25d16fa1 100644
--- a/src/drivers/md25/md25_main.cpp
+++ b/src/drivers/md25/md25_main.cpp
@@ -97,8 +97,9 @@ usage(const char *reason)
int md25_main(int argc, char *argv[])
{
- if (argc < 1)
+ if (argc < 2) {
usage("missing command");
+ }
if (!strcmp(argv[1], "start")) {
diff --git a/src/drivers/roboclaw/roboclaw_main.cpp b/src/drivers/roboclaw/roboclaw_main.cpp
index 83086fd7c..ea7178076 100644
--- a/src/drivers/roboclaw/roboclaw_main.cpp
+++ b/src/drivers/roboclaw/roboclaw_main.cpp
@@ -92,8 +92,9 @@ static void usage()
int roboclaw_main(int argc, char *argv[])
{
- if (argc < 1)
+ if (argc < 2) {
usage();
+ }
if (!strcmp(argv[1], "start")) {