소스 검색

fs: Fix the wrong type of var

The filelen should be signed type, not unsigned type.
otherwise, The condition as below never take.
	if (filelen < 0)

Signed-off-by: Gao Guanhua <B22826@freescale.com>
Signed-off-by: Dave Liu <daveliu@freescale.com>
Gao Guanhua 16 년 전
부모
커밋
351f40caf2
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      common/cmd_ext2.c

+ 2 - 1
common/cmd_ext2.c

@@ -129,7 +129,8 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	char *filename = NULL;
 	char *ep;
 	int dev, part = 1;
-	ulong addr = 0, part_length, filelen;
+	ulong addr = 0, part_length;
+	int filelen;
 	disk_partition_t info;
 	block_dev_desc_t *dev_desc = NULL;
 	char buf [12];