Skip to content
  • Andreas Bießmann's avatar
    tools/kwbimage.c: fix parser error handling · f411b8f2
    Andreas Bießmann authored
    
    
    The two error checks for image_boot_mode_id and image_nand_ecc_mode_id where
    wrong and would never fail, fix that!
    
    This was detected by Apple's clang compiler:
    ---8<---
      HOSTCC  tools/kwbimage.o
    tools/kwbimage.c:553:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                    if (el->bootfrom < 0) {
                        ~~~~~~~~~~~~ ^ ~
    tools/kwbimage.c:571:23: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                    if (el->nandeccmode < 0) {
                        ~~~~~~~~~~~~~~~ ^ ~
    2 warnings generated.
    --->8---
    
    Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
    Acked-By: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
    f411b8f2