summaryrefslogtreecommitdiffstats
path: root/loader2/ftp.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-11-01 21:47:38 +0000
committerChris Lumens <clumens@redhat.com>2006-11-01 21:47:38 +0000
commit170e1bde8cdf211edd96eae9c16390e494dad0ff (patch)
tree0f53f99b9f9dff524ca9aaaa2978f42ef2720316 /loader2/ftp.c
parentba16fdee7cf59c85f7037d92adaebd3e49577378 (diff)
downloadanaconda-170e1bde8cdf211edd96eae9c16390e494dad0ff.tar.gz
anaconda-170e1bde8cdf211edd96eae9c16390e494dad0ff.tar.xz
anaconda-170e1bde8cdf211edd96eae9c16390e494dad0ff.zip
Don't need that variable anymore.
Diffstat (limited to 'loader2/ftp.c')
-rw-r--r--loader2/ftp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/loader2/ftp.c b/loader2/ftp.c
index fa4b1b03a..c6db27e30 100644
--- a/loader2/ftp.c
+++ b/loader2/ftp.c
@@ -665,7 +665,7 @@ static char *find_status_code (char *headers)
int httpGetFileDesc(char * hostname, int port, char * remotename,
char *extraHeaders) {
char * buf, *headers = NULL;
- char *realhost, *status;
+ char *status;
char *hstr;
int family;
struct in_addr addr;
@@ -676,16 +676,14 @@ int httpGetFileDesc(char * hostname, int port, char * remotename,
struct sockaddr_in6 destPort6;
fd_set readSet;
- realhost = hostname;
-
if (port < 0)
port = 80;
family = AF_INET;
- rc = getHostAddress(realhost, &addr, family);
+ rc = getHostAddress(hostname, &addr, family);
if (rc) {
family = AF_INET6;
- rc = getHostAddress(realhost, &addr6, family);
+ rc = getHostAddress(hostname, &addr6, family);
if (rc)
return rc;
}
@@ -720,8 +718,8 @@ int httpGetFileDesc(char * hostname, int port, char * remotename,
else
hstr = "";
- buf = alloca(strlen(remotename) + strlen(realhost) + strlen(hstr) + 25);
- sprintf(buf, "GET %s HTTP/1.0\r\nHost: %s\r\n%s\r\n", remotename, realhost, hstr);
+ buf = alloca(strlen(remotename) + strlen(hostname) + strlen(hstr) + 25);
+ sprintf(buf, "GET %s HTTP/1.0\r\nHost: %s\r\n%s\r\n", remotename, hostname, hstr);
rc = write(sock, buf, strlen(buf));
rc = read_headers (&headers, &readSet, sock);