Fixed using myoptarg instead of optarg

Co-Authored-By: BazookaJoe1900 <BazookaJoe1900@gmail.com>
This commit is contained in:
Beat Küng
2019-02-21 09:45:45 +01:00
co-authored by BazookaJoe1900
parent 550710d502
commit ae335f6bd8
@@ -146,7 +146,7 @@ lsm303agr_main(int argc, char *argv[])
while ((ch = px4_getopt(argc, argv, "XR:a:", &myoptind, &myoptarg)) != EOF) {
switch (ch) {
case 'R':
rotation = (enum Rotation)atoi(optarg);
rotation = (enum Rotation)atoi(myoptarg);
break;
default: