X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Fjim-nvp.c;h=d13bdfba4caea1c4328efd510cf263a0214c068a;hb=703ce2e9414246b15fced07889c58f0acd691053;hp=4602a8db944b3334e0f5496dc028a66071930a04;hpb=8b00e56e6433cff3ff818835953b27765aaabab0;p=openocd.git diff --git a/src/helper/jim-nvp.c b/src/helper/jim-nvp.c index 4602a8db94..d13bdfba4c 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;