فهرست منبع

tools/mkimage: Remove duplicate line of code

Recent commits 1a99de2cb4d08eb3bf9fb3f60a9d533150de8c0e and
6a590c5f5fd12cdd27f3153522acfac3854590e7 both fixed the same bug in the
same manner.  Unfortunately git was "smart" enough to merge both changes
which resulted in some duplicate code.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>

Reordered code and comment a bit.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Peter Tyser 15 سال پیش
والد
کامیت
fbc1c8f6f6
1فایلهای تغییر یافته به همراه2 افزوده شده و 4 حذف شده
  1. 2 4
      tools/mkimage.c

+ 2 - 4
tools/mkimage.c

@@ -229,15 +229,13 @@ main (int argc, char **argv)
 			case 'f':
 			case 'f':
 				if (--argc <= 0)
 				if (--argc <= 0)
 					usage ();
 					usage ();
-				params.type = IH_TYPE_FLATDT;
-				params.datafile = *++argv;
-				params.fflag = 1;
-
 				/*
 				/*
 				 * The flattened image tree (FIT) format
 				 * The flattened image tree (FIT) format
 				 * requires a flattened device tree image type
 				 * requires a flattened device tree image type
 				 */
 				 */
 				params.type = IH_TYPE_FLATDT;
 				params.type = IH_TYPE_FLATDT;
+				params.datafile = *++argv;
+				params.fflag = 1;
 				goto NXTARG;
 				goto NXTARG;
 			case 'n':
 			case 'n':
 				if (--argc <= 0)
 				if (--argc <= 0)