diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2006-07-21 05:51:12 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2006-07-21 05:51:12 +0000 |
commit | a55c70d4ae88a15d9a7f726267fa27fe638496a5 (patch) | |
tree | a0434a0d692e54981268e2375bba8c3826e1f64d /lib/hostip.c | |
parent | 02938a010db060a3d14ae0df6a3f95941c33b810 (diff) | |
download | curl-a55c70d4ae88a15d9a7f726267fa27fe638496a5.tar.gz |
Constify 'hostname' and 'service' to various resolver functions.
Diffstat (limited to 'lib/hostip.c')
-rw-r--r-- | lib/hostip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 21d2297fa..7146bb2bf 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -196,7 +196,7 @@ const char *Curl_printable_address(const Curl_addrinfo *ip, * the DNS caching. */ static char * -create_hostcache_id(char *server, int port) +create_hostcache_id(const char *server, int port) { /* create and return the new allocated entry */ return aprintf("%s:%d", server, port); @@ -327,7 +327,7 @@ sigjmp_buf curl_jmpenv; struct Curl_dns_entry * Curl_cache_addr(struct SessionHandle *data, Curl_addrinfo *addr, - char *hostname, + const char *hostname, int port) { char *entry_id; @@ -344,7 +344,7 @@ Curl_cache_addr(struct SessionHandle *data, entry_len = strlen(entry_id); /* Create a new cache entry */ - dns = (struct Curl_dns_entry *) malloc(sizeof(struct Curl_dns_entry)); + dns = (struct Curl_dns_entry *) calloc(sizeof(struct Curl_dns_entry), 1); if (!dns) { free(entry_id); return NULL; @@ -394,7 +394,7 @@ Curl_cache_addr(struct SessionHandle *data, */ int Curl_resolv(struct connectdata *conn, - char *hostname, + const char *hostname, int port, struct Curl_dns_entry **entry) { |