
4 Feb
2014
4 Feb
'14
11:06 p.m.
On Mon, Feb 03, 2014 at 01:21:02PM -0700, Stephen Warren wrote:
From: Stephen Warren swarren@nvidia.com
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
Applied to u-boot/master, thanks!
--
Tom