From 2a86a53c3fee54f1cd966b430de7980badadd880 Mon Sep 17 00:00:00 2001 From: oharboe Date: Sun, 30 Aug 2009 21:12:50 +0000 Subject: [PATCH] =?utf8?q?David=20Brownell=20=20Minor?= =?utf8?q?=20code=20bugfix:=20check=20right=20variable.=20Via=20code=20rev?= =?utf8?q?iew=20by=20Steve=20Grubb=20=C2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Almost innocuous; this is value is checked later, this check being wrong would make it check stack garbage. git-svn-id: svn://svn.berlios.de/openocd/trunk@2655 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/davinci_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flash/davinci_nand.c b/src/flash/davinci_nand.c index ffd35608df..29c9630050 100644 --- a/src/flash/davinci_nand.c +++ b/src/flash/davinci_nand.c @@ -663,7 +663,7 @@ static int davinci_nand_device_command(struct command_context_s *cmd_ctx, } aemif = strtoul(argv[4], &ep, 0); - if (*ep || chip == 0 || chip == ULONG_MAX) { + if (*ep || aemif == 0 || aemif == ULONG_MAX) { LOG_ERROR("Invalid AEMIF controller address %s", argv[4]); goto fail; } -- 2.30.2