summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util.c b/util.c
index 825a269..e030be6 100644
--- a/util.c
+++ b/util.c
@@ -72,8 +72,7 @@ int get(char *host, char *path, char *sendcookie, char *savecookie, char **buf)
return 0;
if(savecookie != NULL && sscanf(t, "Set-Cookie: %s;", c))
strncat(savecookie, c, COOKIEMAX);
- t2 = strstr(t, "\r\n\r\n");
- if(t2) {
+ if((t2 = strstr(t, "\r\n\r\n")) != NULL) {
t2+=4;
l = res - (t2 - t);
*buf = malloc(sizeof(char *) * l);