X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Farmv4_5.c;h=1a84a5f4e77b34680e06f4ff7c0ff3a07c054545;hp=eeb6694c93c28fd1590425ba409de19be51b4a63;hb=91b9f3de0b8e3277ab5c584c6076ddfe491ffc86;hpb=7e33f87b3d25331f3ac366c88e0b0ebb196422ec diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index eeb6694c93..1a84a5f4e7 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -820,11 +820,9 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv) struct arm *arm; int retval; - context = Jim_GetAssocData(interp, "context"); - if (context == NULL) { - LOG_ERROR("%s: no command context", __func__); - return JIM_ERR; - } + context = current_command_context(interp); + assert( context != NULL); + target = get_current_target(context); if (target == NULL) { LOG_ERROR("%s: no current target", __func__);