]> git.baikalelectronics.ru Git - uboot.git/commit
cmd/led.c: Remove unnecessary check on 'cmd' value
authorTom Rini <trini@konsulko.com>
Wed, 10 May 2017 19:20:14 +0000 (15:20 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 12:37:38 +0000 (08:37 -0400)
commit9bafbb4dd9ccd229082eb9db812a46425be8b21e
tree1279626f8d5ae8807b72b9afb366efcf4a983b18
parentcb148f7e87dbbc88a245ea1c1395cb14910aec38
cmd/led.c: Remove unnecessary check on 'cmd' value

We first check that if argc is less than 2 we return CMD_RET_USAGE.  We
then see if argc is greater than 2 and if so call get_led_cmd() to set
'cmd' and otherwise set it to LEDST_COUNT (which will always be positive
as it's an enum with 0 already assigned).  Therefore the test on if cmd
is less than 0 will always be false and simply be omitted.  Reported by
clang-3.8.

Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/led.c