From 0c4b119d3f8c218f4da0336fb9c25f856f52853e Mon Sep 17 00:00:00 2001 From: dbrownell Date: Sun, 20 Sep 2009 07:55:11 +0000 Subject: Debug message updates: - Shrink messaging during resets, primarily by getting rid of "nothing happened" noise that hides *useful* information. - Improve: the "no IDCODE" message by identifying which tap only supports BYPASS; and the TAP event strings. Related minor code updates: - Remove two needless tests when examining the chain: we know we have a TAP, and that all TAPs have names. - Clean up two loops, turning "while"s into "for"s which better show what's actually being done. git-svn-id: svn://svn.berlios.de/openocd/trunk@2736 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/target.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/target') diff --git a/src/target/target.c b/src/target/target.c index 16e36816..f0e9d8ee 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3409,14 +3409,9 @@ void target_all_handle_event(enum target_event e) void target_handle_event(target_t *target, enum target_event e) { target_event_action_t *teap; - int done; - teap = target->event_action; - - done = 0; - while (teap) { + for (teap = target->event_action; teap != NULL; teap = teap->next) { if (teap->event == e) { - done = 1; LOG_DEBUG("target: (%d) %s (%s) event: %d (%s) action: %s", target->target_number, target->cmd_name, @@ -3429,12 +3424,6 @@ void target_handle_event(target_t *target, enum target_event e) Jim_PrintErrorMessage(interp); } } - teap = teap->next; - } - if (!done) { - LOG_DEBUG("event: %d %s - no action", - e, - Jim_Nvp_value2name_simple(nvp_target_event, e)->name); } } -- cgit v1.2.3