X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftransport%2Ftransport.c;h=072a0d38544d59b0c18f0748efe3d10b266753d1;hp=2f35965759012f872ba8344ad0958ad774a5269f;hb=c7384117c66e8f18896ca09ab8095d6da16bb1e5;hpb=4aa63d59bd9c8a98cfa547cd6d6f477a84c146ee diff --git a/src/transport/transport.c b/src/transport/transport.c index 2f35965759..072a0d3854 100644 --- a/src/transport/transport.c +++ b/src/transport/transport.c @@ -13,7 +13,7 @@ * 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 @@ -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 @@ -206,7 +206,7 @@ COMMAND_HELPER(transport_list_parse, char ***vector) 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; @@ -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++;