From c3b462b3d6c0a5f4fb0da5990eac6c09688449ae Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 9 Jan 2017 16:27:51 -0800 Subject: [PATCH] motor_test: fix getopt call This was trying to use optarg when it should instead use myoptarg. --- src/systemcmds/motor_test/motor_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/systemcmds/motor_test/motor_test.c b/src/systemcmds/motor_test/motor_test.c index 295efead05..66bb60da39 100644 --- a/src/systemcmds/motor_test/motor_test.c +++ b/src/systemcmds/motor_test/motor_test.c @@ -112,12 +112,12 @@ int motor_test_main(int argc, char *argv[]) case 'm': /* Read in motor number */ - channel = (int)strtoul(optarg, NULL, 0); + channel = (int)strtoul(myoptarg, NULL, 0); break; case 'p': /* Read in power value */ - lval = strtoul(optarg, NULL, 0); + lval = strtoul(myoptarg, NULL, 0); if (lval > 100) { usage("value invalid");