mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 16:49:51 +08:00
Linux: Fixed argc check in sensors_main
Was checking for argc < 1, and should be argc < 2. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -2253,8 +2253,9 @@ Sensors::start()
|
|||||||
|
|
||||||
int sensors_main(int argc, char *argv[])
|
int sensors_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc < 1) {
|
if (argc < 2) {
|
||||||
errx(1, "usage: sensors {start|stop|status}");
|
warnx("usage: sensors {start|stop|status}");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(argv[1], "start")) {
|
if (!strcmp(argv[1], "start")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user