aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-10-06 17:44:48 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-10-06 17:44:48 -0700
commit6c10ec924266ebede10fe9553eb82fbd52fd5003 (patch)
treede7ffeffe0d0180156a9b08b1eef031ba897dd4e
parent78e467f98bd472fce0164f32b0da890640439ed4 (diff)
downloadlwip-6c10ec924266ebede10fe9553eb82fbd52fd5003.tar.gz
lwip-6c10ec924266ebede10fe9553eb82fbd52fd5003.tar.xz
lwip-6c10ec924266ebede10fe9553eb82fbd52fd5003.zip
core: pxe: http: minor cleanups
Clean up some incorrect types and stray variables. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/fs/pxe/http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fs/pxe/http.c b/core/fs/pxe/http.c
index c15c574f..0ce5fec2 100644
--- a/core/fs/pxe/http.c
+++ b/core/fs/pxe/http.c
@@ -26,7 +26,6 @@ int http_open(struct file *file, struct url_info *url,
int err;
struct ip_addr ip;
struct netconn *conn = NULL;
- struct netbuf *buf = NULL;
int pos;
enum state {
st_httpver,
@@ -67,12 +66,13 @@ int http_open(struct file *file, struct url_info *url,
" HTTP/1.0\r\n"
"Host: %s\r\n"
"User-Agent: %s\r\n"
+ "Connection: close\r\n"
"\r\n",
url->host,
"PXELINUX/something-or-other");
if (strbuf_error(http_header))
- return NULL;
+ return -1;
/* XXX: implement at least basic authentication here */
@@ -80,7 +80,7 @@ int http_open(struct file *file, struct url_info *url,
err = netconn_gethostbyname(url->host, &ip);
if (err)
- return NULL;
+ return -1;
of->data.conn = conn = netconn_new(NETCONN_TCP);
err = netconn_connect(of->data.conn, &ip, url->port ? url->port : 80);