]> git.sur5r.net Git - openocd/blobdiff - src/jtag/aice/aice_transport.c
jim-nvp: Make Jim_GetOpt_String const-correct
[openocd] / src / jtag / aice / aice_transport.c
index f3012bb22335941f9c1011c974b208a67ba9b79f..4c2f343f5f1e6fb83b2991785d9c22827f8fa3fb 100644 (file)
@@ -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;