diff options
author | Austin Morton <austinpmorton@gmail.com> | 2015-05-02 18:00:37 -0400 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2015-05-17 21:17:02 +0100 |
commit | 38cb629ddf2711f351bbec9d8cc60615dc654a56 (patch) | |
tree | b5e361d6f7846a44a6b91dff7462156f236b44cf /src/target/target.c | |
parent | 8de17eb65aef93d8cf379f750777d3163efdf68a (diff) | |
download | riscv-openocd-38cb629ddf2711f351bbec9d8cc60615dc654a56.zip riscv-openocd-38cb629ddf2711f351bbec9d8cc60615dc654a56.tar.gz riscv-openocd-38cb629ddf2711f351bbec9d8cc60615dc654a56.tar.bz2 |
server: avoid the tcl server crashing when there is no target
Since commit 1d0cf0df37a4e831ca3121ba8987d5848cad3e42
("server: tcl_notifications command") connecting to the tcl server
would terminate openocd. Fix this.
Change-Id: I36e2a7482f7db3a30ff7e9f969c3b6cda9599382
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Reviewed-on: http://openocd.zylin.com/2759
Tested-by: jenkins
Reviewed-by: Forest Crossman <cyrozap@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/target/target.c')
-rw-r--r-- | src/target/target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/target.c b/src/target/target.c index 27f8839..4ea445f 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -486,7 +486,7 @@ struct target *get_target(const char *id) } /* returns a pointer to the n-th configured target */ -static struct target *get_target_by_num(int num) +struct target *get_target_by_num(int num) { struct target *target = all_targets; |