aboutsummaryrefslogtreecommitdiff
path: root/src/helper/jim-nvp.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-13 22:18:14 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-02-29 20:32:31 +0000
commit7c957b601f7aeabc537519597057e63f2ae60320 (patch)
tree4bbc858d5cfac3c1140ba2fa51b46c97f26302d3 /src/helper/jim-nvp.c
parent9721e9dd71d3a6be911d0c650ca824348eee2bc0 (diff)
downloadriscv-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/helper/jim-nvp.c')
-rw-r--r--src/helper/jim-nvp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/helper/jim-nvp.c b/src/helper/jim-nvp.c
index 4602a8d..d13bdfb 100644
--- a/src/helper/jim-nvp.c
+++ b/src/helper/jim-nvp.c
@@ -205,7 +205,7 @@ int Jim_GetOpt_Obj(Jim_GetOptInfo *goi, Jim_Obj **puthere)
return JIM_ERR;
}
-int Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len)
+int Jim_GetOpt_String(Jim_GetOptInfo *goi, const char **puthere, int *len)
{
int r;
Jim_Obj *o;
@@ -215,8 +215,7 @@ int Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len)
if (r == JIM_OK) {
cp = Jim_GetString(o, len);
if (puthere) {
- /* remove const */
- *puthere = (char *)(cp);
+ *puthere = cp;
}
}
return r;