From 18fda50111ae7f70fd4e5d7651e8ebae9f7012f2 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sat, 21 Sep 2013 21:22:17 +0200 Subject: [PATCH] jlink: Replace crazy home cooked assertion with a real one Change-Id: I83d66ddef34965dd94a0ff76aa1367cc9d19f2df Signed-off-by: Andreas Fritiofson Reviewed-on: http://openocd.zylin.com/1644 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/jtag/drivers/jlink.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index ae6a022ae..edf972575 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -1348,11 +1348,7 @@ static void jlink_tap_append_step(int tms, int tdi) { int index_var = tap_length / 8; - if (index_var >= JLINK_TAP_BUFFER_SIZE) { - LOG_ERROR("jlink_tap_append_step: overflow"); - *(uint32_t *)0xFFFFFFFF = 0; - exit(-1); - } + assert(index_var < JLINK_TAP_BUFFER_SIZE); int bit_index = tap_length % 8; uint8_t bit = 1 << bit_index;