X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Farm_tpiu_swo.c;h=f93508622f38b1c521b008dc6f6ca79649ded5e7;hb=refs%2Fchanges%2F71%2F5671%2F9;hp=186ce5d0e50179a680197a62e2c3d20456e540c4;hpb=aacc26559e4984b649083ac046db2cbcb54e2f70;p=openocd.git diff --git a/src/target/arm_tpiu_swo.c b/src/target/arm_tpiu_swo.c index 186ce5d0e5..f93508622f 100644 --- a/src/target/arm_tpiu_swo.c +++ b/src/target/arm_tpiu_swo.c @@ -550,16 +550,16 @@ err_no_params: static int jim_arm_tpiu_swo_configure(Jim_Interp *interp, int argc, Jim_Obj * const *argv) { + struct command *c = jim_to_command(interp); Jim_GetOptInfo goi; Jim_GetOpt_Setup(&goi, interp, argc - 1, argv + 1); - goi.isconfigure = !strcmp(Jim_GetString(argv[0], NULL), "configure"); + goi.isconfigure = !strcmp(c->name, "configure"); if (goi.argc < 1) { Jim_WrongNumArgs(goi.interp, goi.argc, goi.argv, "missing: -option ..."); return JIM_ERR; } - struct command *c = jim_to_command(interp); struct arm_tpiu_swo_object *obj = c->jim_handler_data; return arm_tpiu_swo_configure(&goi, obj); }