mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +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) {
|
if (takesarg) {
|
||||||
*myoptarg = argv[*myoptind];
|
*myoptarg = argv[*myoptind];
|
||||||
|
|
||||||
if (!*myoptarg) { //Error: option takes an argument, but there is no more argument
|
if (!*myoptarg) { //Error: option takes an argument, but there is no more argument
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*myoptind += 1;
|
*myoptind += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user