]> err.no Git - varnish/commitdiff
Use strlen() directly.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Jul 2007 13:52:40 +0000 (13:52 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Jul 2007 13:52:40 +0000 (13:52 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1749 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index 23591d1d7c4a89a75b6fadb4f24e78376bcaf75a..fc3854f73bdf70069c7697ee78ea661aff0b6b82 100644 (file)
@@ -884,13 +884,11 @@ http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr)
 static void
 http_PutField(struct worker *w, int fd, struct http *to, int field, const char *string)
 {
-       const char *e;
        char *p;
        int l;
 
        CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
-       e = strchr(string, '\0');
-       l = (e - string);
+       l = strlen(string);
        p = WS_Alloc(to->ws, l + 1);
        if (p == NULL) {
                WSL(w, SLT_LostHeader, fd, "%s", string);