summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-30 21:12:50 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-30 21:12:50 +0000
commit2a86a53c3fee54f1cd966b430de7980badadd880 (patch)
tree1419f462bb44b7d68921dc90275601ea6e94fb23 /src
parent072d6d3db620d1592b988d9822cc01812eef3586 (diff)
downloadopenocd_libswd-2a86a53c3fee54f1cd966b430de7980badadd880.tar.gz
openocd_libswd-2a86a53c3fee54f1cd966b430de7980badadd880.tar.bz2
openocd_libswd-2a86a53c3fee54f1cd966b430de7980badadd880.tar.xz
openocd_libswd-2a86a53c3fee54f1cd966b430de7980badadd880.zip
David Brownell <david-b@pacbell.net> Minor code bugfix: check right variable.
Via code review by Steve Grubb <sgrubb@redhat.com>  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
Diffstat (limited to 'src')
-rw-r--r--src/flash/davinci_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/davinci_nand.c b/src/flash/davinci_nand.c
index ffd35608..29c96300 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;
}