commit | 0db5f0bc9947d3b65bba1e7db050b528fd9b2d86 | [log] [tgz] |
---|---|---|
author | Peng Fan <Peng.Fan@freescale.com> | Tue Nov 24 16:54:21 2015 +0800 |
committer | Tom Rini <trini@konsulko.com> | Sat Dec 05 18:22:14 2015 -0500 |
tree | a3797aed6aa85dfcf743d8e10ef30ae701e499d5 | |
parent | c4485e72631f08cdaab56a25e2c41c1c78d5a48a [diff] |
common: cli_hush: avoid dead code Condition "(value == NULL && ++value == NULL)" actully will always return false. Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect such expression "c=". To "c=", *(value + 1) is 0, so directly return -1, but not continue. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Rabin Vincent <rabin@rab.in> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>