summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jtag/tcl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index d9047ac9..04fca227 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -373,13 +373,17 @@ static void jtag_tap_handle_event(jtag_tap_t *tap, enum jtag_event e)
Jim_GetString(jteap->body, NULL));
if (Jim_EvalObj(interp, jteap->body) != JIM_OK) {
Jim_PrintErrorMessage(interp);
- } else {
+ } else switch (e) {
+ case JTAG_TAP_EVENT_ENABLE:
+ case JTAG_TAP_EVENT_DISABLE:
/* NOTE: we currently assume the handlers
* can't fail. That presumes later code
* will be verifying the scan chains ...
*/
- if (e == JTAG_TAP_EVENT_ENABLE)
- tap->enabled = true;
+ tap->enabled = (e == JTAG_TAP_EVENT_ENABLE);
+ break;
+ default:
+ break;
}
}