]> www.infradead.org Git - mtd-utils.git/commitdiff
nandwrite: trivial variable move
authorBrian Norris <computersforpeace@gmail.com>
Wed, 31 Aug 2011 20:00:30 +0000 (13:00 -0700)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Sun, 11 Sep 2011 12:59:44 +0000 (15:59 +0300)
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
nandwrite.c

index 95baa384685c68be9bda6533588aef6bd7c5fdef..17a717c9ff038edc780ad000b95ef05aed61482a 100644 (file)
@@ -496,7 +496,7 @@ int main(int argc, char * const argv[])
                        }
 
                        if (!noecc) {
-                               int i, start, len;
+                               int start, len;
                                struct nand_oobinfo old_oobinfo;
 
                                /* Read the current oob info */
@@ -514,7 +514,7 @@ int main(int argc, char * const argv[])
                                 * such as the layout used by diskonchip.c
                                 */
                                if (old_oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
-                                       int tags_pos = 0, tmp_ofs;
+                                       int i, tags_pos = 0, tmp_ofs;
                                        for (i = 0; old_oobinfo.oobfree[i][1]; i++) {
                                                /* Set the reserved bytes to 0xff */
                                                start = old_oobinfo.oobfree[i][0];