* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef HAVE_CONFIG_H
* currently selected debug adapter supports. This is declared
* by the time that adapter is fully set up.
*/
-static const char **allowed_transports;
+static const char * const *allowed_transports;
/** * The transport being used for the current OpenOCD session. */
static struct transport *session;
* to declare the set of transports supported by an adapter. When
* there is only one member of that set, it is automatically selected.
*/
-int allow_transports(struct command_context *ctx, const char **vector)
+int allow_transports(struct command_context *ctx, const char * const *vector)
{
/* NOTE: caller is required to provide only a list
* of *valid* transport names
return ERROR_COMMAND_SYNTAX_ERROR;
/* our return vector must be NULL terminated */
- argv = (char **) calloc(n + 1, sizeof(char *));
+ argv = calloc(n + 1, sizeof(char *));
if (argv == NULL)
return ERROR_FAIL;
LOG_ERROR("session's transport is not selected.");
/* no session transport configured, print transports then fail */
- const char **vector = allowed_transports;
+ const char * const *vector = allowed_transports;
while (*vector) {
LOG_ERROR("allow transport '%s'", *vector);
vector++;