]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image-fit: Fix compiler warning in fit_conf_print()
authorHans de Goede <hdegoede@redhat.com>
Fri, 29 May 2015 13:09:48 +0000 (15:09 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 6 Jun 2015 13:30:20 +0000 (09:30 -0400)
This fixes the following compiler warning:

In file included from tools/common/image-fit.c:1:0:
./tools/../common/image-fit.c: In function ‘fit_conf_print’:
./tools/../common/image-fit.c:1470:27: warning: logical not is only applied
 to the left hand side of comparison [-Wlogical-not-parentheses]
    (const char **)&uname) > 0;

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
common/image-fit.c

index 4bd8feaf3b77e3ef6c33956e7a84082a5e2cdcbe..28f7aa83ba4e6b60882227a2670a69c27c8d76ca 100644 (file)
@@ -1464,10 +1464,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
 
        /* Print out all of the specified loadables */
        for (loadables_index = 0;
-            !fdt_get_string_index(fit, noffset,
+            fdt_get_string_index(fit, noffset,
                        FIT_LOADABLE_PROP,
                        loadables_index,
-                       (const char **)&uname) > 0;
+                       (const char **)&uname) == 0;
             loadables_index++)
        {
                if (loadables_index == 0) {