]> git.sur5r.net Git - u-boot/commitdiff
cmd_ximg.c: fix error: 'i' undeclared
authorWolfgang Denk <wd@denx.de>
Sun, 31 Jan 2010 20:51:43 +0000 (21:51 +0100)
committerWolfgang Denk <wd@denx.de>
Sun, 31 Jan 2010 20:51:43 +0000 (21:51 +0100)
Fix compile error:

cmd_ximg.c: In function 'do_imgextract':
cmd_ximg.c:234: error: 'i' undeclared (first use in this function)
cmd_ximg.c:234: error: (Each undeclared identifier is reported only once
cmd_ximg.c:234: error: for each function it appears in.)

Signed-off-by: Wolfgang Denk <wd@denx.de>
common/cmd_ximg.c

index 3e5fb44475b60fb98a228a8b40c8a15b3bdb85da..b34c4d02da00a52fa31458afa73fe01c6b411499 100644 (file)
@@ -225,20 +225,25 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        break;
 #if defined(CONFIG_BZIP2)
                case IH_COMP_BZIP2:
-                       printf ("   Uncompressing part %d ... ", part);
-                       /*
-                        * If we've got less than 4 MB of malloc() space,
-                        * use slower decompression algorithm which requires
-                        * at most 2300 KB of memory.
-                        */
-                       i = BZ2_bzBuffToBuffDecompress
-                               ((char*)ntohl(hdr->ih_load),
-                                &unc_len, (char *)data, len,
-                                CONFIG_SYS_MALLOC_LEN < (4096 * 1024), 0);
-                       if (i != BZ_OK) {
-                               printf ("BUNZIP2 ERROR %d - "
-                                       "image not loaded\n", i);
-                               return 1;
+                       {
+                               int i;
+
+                               printf ("   Uncompressing part %d ... ", part);
+                               /*
+                                 * If we've got less than 4 MB of malloc()
+                                * space, use slower decompression algorithm
+                                * which requires at most 2300 KB of memory.
+                                */
+                               i = BZ2_bzBuffToBuffDecompress(
+                                       (char*)ntohl(hdr->ih_load),
+                                       &unc_len, (char *)data, len,
+                                       CONFIG_SYS_MALLOC_LEN < (4096 * 1024),
+                                       0);
+                               if (i != BZ_OK) {
+                                       printf ("BUNZIP2 ERROR %d - "
+                                               "image not loaded\n", i);
+                                       return 1;
+                               }
                        }
                        break;
 #endif /* CONFIG_BZIP2 */