summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <nick.white@proporta.com>2011-08-18 10:59:35 +0100
committerNick White <nick.white@proporta.com>2011-08-18 10:59:35 +0100
commitbcf32c0a39647db4ebd1689bb04150e9b366fc1c (patch)
tree29ccccf2e40151875b36abf0bfeeab1898531103
parent7638ce1addb79e4f353f33c1c3ac1be0a11cc7f1 (diff)
Little cleanup
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 11d89fe..4fd2a8b 100644
--- a/util.c
+++ b/util.c
@@ -44,7 +44,7 @@ int dial(char *host, char *port) {
int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf) {
size_t l, res;
int fd, i, p;
- char h[HDRMAX] = "\0";
+ char h[HDRMAX] = "";
char c[COOKIEMAX] = "";
char t[BUFSIZ];
char *t2;
@@ -59,7 +59,7 @@ int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf)
*buf = NULL;
l = 0;
- while((res = recv(fd, t, 1024, 0)) > 0) {
+ while((res = recv(fd, t, BUFSIZ, 0)) > 0) {
if(sscanf(t, "HTTP/%d.%d %d", &i, &i, &p) == 3 && p != 200)
return 0;
if(savecookie != NULL && sscanf(t, "Set-Cookie: %s;", c))