aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm_tpiu_swo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/arm_tpiu_swo.c')
-rw-r--r--src/target/arm_tpiu_swo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/arm_tpiu_swo.c b/src/target/arm_tpiu_swo.c
index 186ce5d..f935086 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);
}