diff options
author | Matt Rogers <mrogers@redhat.com> | 2016-08-12 15:40:23 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2016-09-19 11:30:51 -0400 |
commit | da9768c350a90bccf8ff53bf9b58fea847bbe036 (patch) | |
tree | a0e3e5e9391ddecf924ba11492023727501c9681 | |
parent | c75596d01e7c78d38d0889a1a77145269ac724b2 (diff) | |
download | krb5-da9768c350a90bccf8ff53bf9b58fea847bbe036.zip krb5-da9768c350a90bccf8ff53bf9b58fea847bbe036.tar.gz krb5-da9768c350a90bccf8ff53bf9b58fea847bbe036.tar.bz2 |
Constify function parameters in locate_kdc.c
Constify parse_uri_if_https() and add_host_to_list() char parameters
as well as the variables passed by their callers.
-rw-r--r-- | src/lib/krb5/os/locate_kdc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 477f506..ca6702e 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -152,7 +152,7 @@ add_addr_to_list(struct serverlist *list, k5_transport transport, int family, /* Add a hostname entry to list. */ static int add_host_to_list(struct serverlist *list, const char *hostname, int port, - k5_transport transport, int family, char *uri_path, + k5_transport transport, int family, const char *uri_path, int master) { struct server_entry *entry; @@ -181,8 +181,8 @@ oom: } static void -parse_uri_if_https(char *host_or_uri, k5_transport *transport, char **host, - char **uri_path) +parse_uri_if_https(const char *host_or_uri, k5_transport *transport, + const char **host, const char **uri_path) { char *cp; @@ -222,7 +222,8 @@ locate_srv_conf_1(krb5_context context, const krb5_data *realm, k5_transport transport, int udpport) { const char *realm_srv_names[4]; - char **hostlist = NULL, *realmstr = NULL, *host = NULL, *hostspec; + char **hostlist = NULL, *realmstr = NULL, *host = NULL; + const char *hostspec; krb5_error_code code; int i, default_port; @@ -249,7 +250,7 @@ locate_srv_conf_1(krb5_context context, const krb5_data *realm, for (i=0; hostlist[i]; i++) { int port_num; k5_transport this_transport = transport; - char *uri_path = NULL; + const char *uri_path = NULL; hostspec = hostlist[i]; Tprintf ("entry %d is '%s'\n", i, hostspec); @@ -587,8 +588,8 @@ locate_uri(const krb5_data *realm, const char *req_service, krb5_error_code ret; k5_transport transport, host_trans; struct srv_dns_entry *answers, *entry; - char *path, *host; - const char *host_field; + char *host; + const char *host_field, *path; int port, def_port, master; ret = k5_make_uri_query(realm, req_service, &answers); |