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
This commit is contained in:
Andreas Fritiofson
2015-12-13 22:18:14 +01:00
parent 9721e9dd71
commit 7c957b601f
8 changed files with 25 additions and 22 deletions

View File

@@ -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;