aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2013-09-28 23:33:59 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2013-10-31 20:43:35 +0000
commit582c8b014727f27a078302e684ba661a9a081963 (patch)
tree6a75df33b39f5f61ffa1a9665ed366ae5b3b2106
parentba2fbe22470915359e1905aaad4c613eacbdf6dc (diff)
ftdi: Remove unnecessary cast
Also make sure future growth of the tap_get_tms_path() return value will get noticed. Change-Id: Id859b463e5fdc819a4bc3b4845bf4363fbe713af Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1768 Tested-by: jenkins Reviewed-by: Mathias Küster <kesmtp@freenet.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
-rw-r--r--src/jtag/drivers/ftdi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index 4566ed3c..a6070b11 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -205,8 +205,9 @@ static void move_to_state(tap_state_t goal_state)
*/
/* do the 2 lookups */
- int tms_bits = tap_get_tms_path(start_state, goal_state);
+ uint8_t tms_bits = tap_get_tms_path(start_state, goal_state);
int tms_count = tap_get_tms_path_len(start_state, goal_state);
+ assert(tms_count <= 8);
DEBUG_JTAG_IO("start=%s goal=%s", tap_state_name(start_state), tap_state_name(goal_state));
@@ -215,7 +216,7 @@ static void move_to_state(tap_state_t goal_state)
tap_set_state(tap_state_transition(tap_get_state(), (tms_bits >> i) & 1));
mpsse_clock_tms_cs_out(mpsse_ctx,
- (uint8_t *)&tms_bits,
+ &tms_bits,
0,
tms_count,
false,