summaryrefslogtreecommitdiff
path: root/src/jtag
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-12 01:41:07 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-12 01:41:07 +0000
commita351c57261d37d73d9e9942063e34e8fe5202380 (patch)
treecb1d71355bdeea5945f4771dabbf24f2a743eb40 /src/jtag
parentf5e4511701c0c5cc24278a5c8ab9bf81b2538b6a (diff)
downloadopenocd+libswd-a351c57261d37d73d9e9942063e34e8fe5202380.tar.gz
openocd+libswd-a351c57261d37d73d9e9942063e34e8fe5202380.tar.bz2
openocd+libswd-a351c57261d37d73d9e9942063e34e8fe5202380.tar.xz
openocd+libswd-a351c57261d37d73d9e9942063e34e8fe5202380.zip
Fix unitialized use of cur_speed in handle_jtag_khz_command:
- Use the default KHz speed setting, in case interface is not initialized. git-svn-id: svn://svn.berlios.de/openocd/trunk@2218 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag')
-rw-r--r--src/jtag/tcl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index 5fc1bce2..152dd762 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -1038,7 +1038,7 @@ static int handle_jtag_khz_command(struct command_context_s *cmd_ctx, char *cmd,
return retval;
}
- int cur_speed;
+ int cur_speed = jtag_get_speed_khz();
retval = jtag_get_speed_readable(&cur_speed);
if (ERROR_OK != retval)
return retval;