summaryrefslogtreecommitdiff
path: root/common/cmd_ximg.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-02-03 13:21:02 -0700
committerTom Rini <trini@ti.com>2014-02-19 09:47:33 -0500
commit490ba833d5a7804ca81b13b3f8f2c37aadc40009 (patch)
tree5f7e2a4658c2b1c92a7b8d90afb747be563dad97 /common/cmd_ximg.c
parent377202b5604e9e17074955538dc8081169a43137 (diff)
downloadu-boot-490ba833d5a7804ca81b13b3f8f2c37aadc40009.tar.gz
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 'common/cmd_ximg.c')
0 files changed, 0 insertions, 0 deletions