forked from auracaster/openocd
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user