]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
cmd_test: evaluate to false without any arguments
authorStephen Warren <swarren@nvidia.com>
Mon, 3 Feb 2014 20:21:05 +0000 (13:21 -0700)
committerTom Rini <trini@ti.com>
Wed, 19 Feb 2014 14:47:33 +0000 (09:47 -0500)
commit2453de99df576fb907fe06cac58c628e3590833f
treea331706ce42516b2aa0a253ac8ebce4071f7caec
parentd9b651ce31f464605eb590db9f60dd0bf92238dc
cmd_test: evaluate to false without any arguments

This emulates bash:
$ if test; then echo yes; else echo no; fi
no

Currently, the code sets expr = -1 in this case, which gets mapped to
0 (true) at the end of do_test() by the logical -> shell exit code
conversion.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
common/cmd_test.c