summaryrefslogtreecommitdiff
path: root/src/reqs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reqs.c')
-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);