summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-09-23 07:49:06 +0530
committerMukund Sivaraman <muks@banu.com>2009-09-27 08:09:23 +0530
commit38c20cd8676d8152b4437346925995f76fa62815 (patch)
treeca54afa3d9ec25b361ec3f330aece7982e020089 /src
parentc8be0250cd88adc1fc61ded2b45354d9823b0588 (diff)
Add explicit casts for c++ mode in transparent-proxy.c
Diffstat (limited to 'src')
-rw-r--r--src/transparent-proxy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/transparent-proxy.c b/src/transparent-proxy.c
index 81c35ef..96ae54b 100644
--- a/src/transparent-proxy.c
+++ b/src/transparent-proxy.c
@@ -45,7 +45,7 @@ static int build_url (char **url, const char *host, int port, const char *path)
assert (path != NULL);
len = strlen (host) + strlen (path) + 14;
- *url = safemalloc (len);
+ *url = (char *) safemalloc (len);
if (*url == NULL)
return -1;
@@ -75,10 +75,10 @@ do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders,
"url", url, NULL);
return 0;
}
- request->host = safemalloc (17);
+ request->host = (char *) safemalloc (17);
strcpy (request->host, inet_ntoa (dest_addr.sin_addr));
request->port = ntohs (dest_addr.sin_port);
- request->path = safemalloc (strlen (url) + 1);
+ request->path = (char *) safemalloc (strlen (url) + 1);
strcpy (request->path, url);
safefree (url);
build_url (&url, request->host, request->port, request->path);
@@ -86,13 +86,13 @@ do_transparent_proxy (struct conn_s *connptr, hashmap_t hashofheaders,
"process_request: trans IP %s %s for %d",
request->method, url, connptr->client_fd);
} else {
- request->host = safemalloc (length + 1);
+ request->host = (char *) safemalloc (length + 1);
if (sscanf (data, "%[^:]:%hu", request->host, &request->port) !=
2) {
strcpy (request->host, data);
request->port = HTTP_PORT;
}
- request->path = safemalloc (strlen (url) + 1);
+ request->path = (char *) safemalloc (strlen (url) + 1);
strcpy (request->path, url);
safefree (url);
build_url (&url, request->host, request->port, request->path);