Re: [U-Boot] [PATCH V4 04/12] cmd_test: use table lookup for parsing

2014-02-04 Thread Tom Rini
On Mon, Feb 03, 2014 at 01:21:02PM -0700, Stephen Warren wrote: From: Stephen Warren swar...@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

[U-Boot] [PATCH V4 04/12] cmd_test: use table lookup for parsing

2014-02-03 Thread Stephen Warren
From: Stephen Warren swar...@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