mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 18:37:35 +08:00
using only px4_getopt() and never the unsafe getopt()
using only <px4_getopt.h> as include, cleanup related includes added check that all the option are valid (myoptind >= argc). if there are invalid options on some script that might now lead not to run commands
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include <px4_module.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -56,7 +57,6 @@
|
||||
#include <string.h>
|
||||
#include <semaphore.h>
|
||||
#include <unistd.h>
|
||||
#include <platforms/px4_getopt.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include "dataman.h"
|
||||
|
||||
Reference in New Issue
Block a user