aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-05-10 11:31:35 +0200
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-06-28 09:33:31 +0000
commitcc99e57b0e8ed3672afce1925142863cceb809f2 (patch)
treee6e059b1f0753c1f166b75c55643530b2f4c7b42 /src/transport/transport.c
parentae3bcd05f87c9caf7f8900d54a380415f8f37326 (diff)
transport: Constify the transports vector
Change-Id: I0c874b5d4c97cf781d83bd381d701f770e069f72 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2135 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/transport/transport.c')
-rw-r--r--src/transport/transport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 35194b51..072a0d38 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -61,7 +61,7 @@ static struct transport *transport_list;
* 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;
@@ -94,7 +94,7 @@ static int transport_select(struct command_context *ctx, const char *name)
* 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
@@ -242,7 +242,7 @@ COMMAND_HANDLER(handle_transport_init)
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++;