]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
image: Fix loop condition to avoid warning
authorThierry Reding <treding@nvidia.com>
Thu, 20 Aug 2015 09:45:43 +0000 (11:45 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 09:29:48 +0000 (11:29 +0200)
commitba940c67292a31363705c61e3af6564b7e8eed57
tree903eb995e117e5060a74884ffe9fc01b34e95347
parent0fef356a95f4dfe746a124c5b160d830c5f7310a
image: Fix loop condition to avoid warning

GCC 5.1 starts warning for comparisons such as !a > 0, assuming that the
negation was meant to apply to the whole expression rather than just the
left operand.

Indeed the comparison in the FIT loadable code is confusingly written,
though it does end up doing the right thing. Rewrite the condition to be
more explicit, that is, iterate over strings until they're exhausted.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/image.c