diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-02-03 13:21:02 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-02-19 09:47:33 -0500 |
commit | 490ba833d5a7804ca81b13b3f8f2c37aadc40009 (patch) | |
tree | 5f7e2a4658c2b1c92a7b8d90afb747be563dad97 /doc/README.sha1 | |
parent | 377202b5604e9e17074955538dc8081169a43137 (diff) | |
download | u-boot-imx-490ba833d5a7804ca81b13b3f8f2c37aadc40009.zip u-boot-imx-490ba833d5a7804ca81b13b3f8f2c37aadc40009.tar.gz u-boot-imx-490ba833d5a7804ca81b13b3f8f2c37aadc40009.tar.bz2 |
cmd_test: use table lookup for parsing
do_test() currently uses strcmp() twice to determine which operator is
present; once to determine how many arguments the operator needs, then
a second time to actually decode the operator and implement it.
Rewrite the code so that a table lookup is used to translate the operator
string to an integer, and use a more efficient switch statement to decode
and execute the operator.
This approach also acts as enablement for the following patches.
This patch should introduce no behavioural change.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'doc/README.sha1')
0 files changed, 0 insertions, 0 deletions