]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools/kwbimage.c: fix parser error handling
authorAndreas Bießmann <andreas.devel@googlemail.com>
Fri, 24 Oct 2014 21:25:52 +0000 (23:25 +0200)
committerTom Rini <trini@ti.com>
Sun, 11 Jan 2015 14:05:03 +0000 (09:05 -0500)
commitf411b8f2270bc75113d60f2ad662f25de6242b7d
treeb514043733402d2e1201c73301aa0f22d0868284
parent41e82da12a7f5f12eeb5d598adcd73870ed72544
tools/kwbimage.c: fix parser error handling

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: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-By: Jeroen Hofstee <jeroen@myspectrum.nl>
tools/kwbimage.c