mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:16:50 +08:00
px4_getopt: astyle
This commit is contained in:
@@ -168,9 +168,11 @@ __EXPORT int px4_getopt(int argc, char *argv[], const char *options, int *myopti
|
||||
|
||||
if (takesarg) {
|
||||
*myoptarg = argv[*myoptind];
|
||||
|
||||
if (!*myoptarg) { //Error: option takes an argument, but there is no more argument
|
||||
return -1;
|
||||
}
|
||||
|
||||
*myoptind += 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user