diff options
| author | Keith Packard <keithp@keithp.com> | 2018-08-15 19:13:45 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2018-10-13 08:22:50 -0700 |
| commit | c417ab1de2a083b5fcff2e081e4feb2a65887903 (patch) | |
| tree | 614c7564321ea38402883992daeaea8f30bfe6b1 /src/kernel/ao_fake_flight.c | |
| parent | c6e57291d91f1f6c4de5c54a5cfd3eef66d9f830 (diff) | |
altos: Make cmd number parsing functions return value
Don't use a global variable to hold the result.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_fake_flight.c')
| -rw-r--r-- | src/kernel/ao_fake_flight.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/kernel/ao_fake_flight.c b/src/kernel/ao_fake_flight.c index 5880cf2b..8da0141c 100644 --- a/src/kernel/ao_fake_flight.c +++ b/src/kernel/ao_fake_flight.c @@ -133,14 +133,12 @@ ao_fake_flight(void) enum ao_flight_state my_state = ao_flight_invalid; int i; - ao_cmd_hex(); + calib_size = ao_cmd_hex(); if (ao_cmd_status != ao_cmd_success) return; - calib_size = ao_cmd_lex_i; - ao_cmd_hex(); + data_size = ao_cmd_hex(); if (ao_cmd_status != ao_cmd_success) return; - data_size = ao_cmd_lex_i; if ((unsigned) calib_size != sizeof (struct ao_fake_calib)) { printf ("calib size %d larger than actual size %d\n", calib_size, sizeof (struct ao_fake_calib)); |
