summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-11-16 13:10:03 +0100
committerMichael Adam <obnox@samba.org>2013-11-16 13:10:03 +0100
commit69c348ce6d553a2172b6cb126268826b7b637082 (patch)
tree8fa3ec5b56fdc07417febaa35766b9a3062c626f
parentbb2e894e0dd7cafb730ea56496dbc43997f6c98e (diff)
downloadtinyproxy-69c348ce6d553a2172b6cb126268826b7b637082.tar.gz
tinyproxy-69c348ce6d553a2172b6cb126268826b7b637082.zip
req: move a variable into the scope where it is used in extract_http_url()
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to '')
-rw-r--r--src/reqs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reqs.c b/src/reqs.c
index d762fe8..f527c57 100644
--- a/src/reqs.c
+++ b/src/reqs.c
@@ -192,12 +192,12 @@ static int strip_return_port (char *host)
static int extract_http_url (const char *url, struct request_s *request)
{
char *p;
- int len;
int port;
/* Split the URL on the slash to separate host from path */
p = strchr (url, '/');
if (p != NULL) {
+ int len;
len = p - url;
request->host = (char *) safemalloc (len + 1);
memcpy (request->host, url, len);