if (argc == 1)
{
/* try as tcltarget name */
- for( target = all_targets ; target ; target++ ){
+ for( target = all_targets ; target ; target = target->next ){
if( target->cmd_name ){
if( 0 == strcmp( args[0], target->cmd_name ) ){
/* MATCH */
cmd_ctx->current_target = target->target_number;
return ERROR_OK;
}
- DumpTargets:
+DumpTargets:
+ target = all_targets;
command_print(cmd_ctx, " CmdName Type Endian ChainPos State ");
command_print(cmd_ctx, "-- ---------- ---------- ---------- -------- ----------");
while (target)