mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
058d4408cc
commit
894611df04
@ -2253,8 +2253,9 @@ Sensors::start()
|
||||
|
||||
int sensors_main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 1) {
|
||||
errx(1, "usage: sensors {start|stop|status}");
|
||||
if (argc < 2) {
|
||||
warnx("usage: sensors {start|stop|status}");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[1], "start")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user