From 69c348ce6d553a2172b6cb126268826b7b637082 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 16 Nov 2013 13:10:03 +0100 Subject: req: move a variable into the scope where it is used in extract_http_url() Signed-off-by: Michael Adam --- src/reqs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/reqs.c') 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); -- cgit v1.2.3