Add explicit casts for c++ mode in reverse-proxy.c
This commit is contained in:
parent
00931dfc68
commit
0dda30295e
@ -53,7 +53,9 @@ void reversepath_add (const char *path, const char *url)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(reverse = safemalloc (sizeof (struct reversepath)))) {
|
reverse = (struct reversepath *) safemalloc (sizeof
|
||||||
|
(struct reversepath));
|
||||||
|
if (!reverse) {
|
||||||
log_message (LOG_ERR,
|
log_message (LOG_ERR,
|
||||||
"Unable to allocate memory in reversepath_add()");
|
"Unable to allocate memory in reversepath_add()");
|
||||||
return;
|
return;
|
||||||
@ -107,7 +109,7 @@ char *reverse_rewrite_url (struct conn_s *connptr, hashmap_t hashofheaders,
|
|||||||
/* First try locating the reverse mapping by request url */
|
/* First try locating the reverse mapping by request url */
|
||||||
reverse = reversepath_get (url);
|
reverse = reversepath_get (url);
|
||||||
if (reverse) {
|
if (reverse) {
|
||||||
rewrite_url =
|
rewrite_url = (char *)
|
||||||
safemalloc (strlen (url) + strlen (reverse->url) +
|
safemalloc (strlen (url) + strlen (reverse->url) +
|
||||||
1);
|
1);
|
||||||
strcpy (rewrite_url, reverse->url);
|
strcpy (rewrite_url, reverse->url);
|
||||||
@ -124,9 +126,10 @@ char *reverse_rewrite_url (struct conn_s *connptr, hashmap_t hashofheaders,
|
|||||||
strlen (REVERSE_COOKIE) +
|
strlen (REVERSE_COOKIE) +
|
||||||
1))) {
|
1))) {
|
||||||
|
|
||||||
rewrite_url = safemalloc (strlen (url) +
|
rewrite_url = (char *) safemalloc
|
||||||
strlen (reverse->
|
(strlen (url) +
|
||||||
url) + 1);
|
strlen (reverse->url) +
|
||||||
|
1);
|
||||||
strcpy (rewrite_url, reverse->url);
|
strcpy (rewrite_url, reverse->url);
|
||||||
strcat (rewrite_url, url + 1);
|
strcat (rewrite_url, url + 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user