diff options
author | Nick White <nick.white@proporta.com> | 2011-08-18 10:59:35 +0100 |
---|---|---|
committer | Nick White <nick.white@proporta.com> | 2011-08-18 10:59:35 +0100 |
commit | bcf32c0a39647db4ebd1689bb04150e9b366fc1c (patch) | |
tree | 29ccccf2e40151875b36abf0bfeeab1898531103 | |
parent | 7638ce1addb79e4f353f33c1c3ac1be0a11cc7f1 (diff) |
Little cleanup
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) |