Skip to contentSkip to conversation

fs: Fix the wrong type of var

PATCH New Dave Liu 2 participants 2 messages Apr 14, 2009 – Apr 27, 2009

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH 1/1 fs: Fix the wrong type of var

From: Gao Guanhua <[email protected]>

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

---
 common/cmd_ext2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
common/cmd_ext2.c +2 -1
index c2dcc64..8e316c7 100644
@@ -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];
Signature · 1 line
1.5.4
#1 lore raw

PATCH 1/1 fs: Fix the wrong type of var

Dear Dave Liu,

Quoted 11 lines · In message <[email protected]> you wrote:

From: Gao Guanhua <[email protected]>

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

---
 common/cmd_ext2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Good morning. This is the telephone company. Due  to  repairs,  we're
giving  you  advance notice that your service will be cut off indefi-
nitely at ten o'clock. That's two minutes from now.