diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2015-12-13 22:18:14 +0100 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2016-02-29 20:32:31 +0000 |
commit | 7c957b601f7aeabc537519597057e63f2ae60320 (patch) | |
tree | 4bbc858d5cfac3c1140ba2fa51b46c97f26302d3 /src/jtag/aice/aice_transport.c | |
parent | 9721e9dd71d3a6be911d0c650ca824348eee2bc0 (diff) | |
download | riscv-openocd-7c957b601f7aeabc537519597057e63f2ae60320.zip riscv-openocd-7c957b601f7aeabc537519597057e63f2ae60320.tar.gz riscv-openocd-7c957b601f7aeabc537519597057e63f2ae60320.tar.bz2 |
jim-nvp: Make Jim_GetOpt_String const-correct
Change-Id: Iae9824f6ff47a1944e674e59bfaa970904645082
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/3178
Tested-by: jenkins
Diffstat (limited to 'src/jtag/aice/aice_transport.c')
-rw-r--r-- | src/jtag/aice/aice_transport.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jtag/aice/aice_transport.c b/src/jtag/aice/aice_transport.c index f3012bb..4c2f343 100644 --- a/src/jtag/aice/aice_transport.c +++ b/src/jtag/aice/aice_transport.c @@ -90,11 +90,13 @@ static int jim_aice_newtap_cmd(Jim_GetOptInfo *goi) free(pTap); return JIM_ERR; } - Jim_GetOpt_String(goi, &cp, NULL); - pTap->chip = strdup(cp); - Jim_GetOpt_String(goi, &cp, NULL); - pTap->tapname = strdup(cp); + const char *tmp; + Jim_GetOpt_String(goi, &tmp, NULL); + pTap->chip = strdup(tmp); + + Jim_GetOpt_String(goi, &tmp, NULL); + pTap->tapname = strdup(tmp); /* name + dot + name + null */ x = strlen(pTap->chip) + 1 + strlen(pTap->tapname) + 1; |