• P
    common: cli_hush: avoid dead code · aa722529
    Peng Fan 提交于
    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: NPeng 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: NSimon Glass <sjg@chromium.org>
    aa722529
cli_hush.c 93.2 KB