req: move a variable into the scope where it is used in extract_http_url()

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Michael Adam committed 2013-11-16 13:10:03 +01:00
1 parent bb2e894e0d
commit 69c348ce6d
1 file changed
+1 -1
+1 -1
View File
@@ -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);