diff options
author | Nick White <git@njw.me.uk> | 2011-08-18 21:35:45 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-08-18 21:35:45 +0100 |
commit | 3ee5af0589fab8c0aec7425c3ca6ba3f27a9b35d (patch) | |
tree | 6b01fa00530ab44d0887c5a0aea44cd2af6b81b5 | |
parent | 4f88334bc8752c34ff5d3bd545a6dcb35fc5faee (diff) |
Little cleanup of util
-rw-r--r-- | util.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); |