Fix possible uninitialized variable compiler warning.
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 10 Oct 2006 06:23:32 +0000 (00:23 -0600)
committerJon Loeliger <jdl@freescale.com>
Thu, 12 Oct 2006 13:42:03 +0000 (08:42 -0500)
When CONFIG_OF_FLAG_TREE is set, the compiler complains that 'len' in
do_bootm_linux() may be uninitialized.  There is no possibility in the
current code that len will get used uninitialized, but this fix follows
the existing convention of setting both len and data to zero at the same
time.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
common/cmd_bootm.c

index e2cb6b93cd4b1c9add3c62377b72769bc0e37a42..c533c00d664c60032b6fa927ddd99062d3d6dadb 100644 (file)
@@ -625,7 +625,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
        /* Look for a '-' which indicates to ignore the ramdisk argument */
        if (argc >= 3 && strcmp(argv[2], "-") ==  0) {
                        debug ("Skipping initrd\n");
-                       data = 0;
+                       len = data = 0;
                }
        else
 #endif